Commit 46384d09 authored by Asahi Lina's avatar Asahi Lina Committed by Miguel Ojeda

rust: error: Rename to_kernel_errno() -> to_errno()

This is kernel code, so specifying "kernel" is redundant. Let's simplify
things and just call it to_errno().
Reviewed-by: default avatarGary Guo <gary@garyguo.net>
Reviewed-by: default avatarMartin Rodriguez Reboredo <yakoyoku@gmail.com>
Signed-off-by: default avatarAsahi Lina <lina@asahilina.net>
Link: https://lore.kernel.org/r/20230224-rust-error-v3-1-03779bddc02b@asahilina.netSigned-off-by: default avatarMiguel Ojeda <ojeda@kernel.org>
parent 31d95c2f
......@@ -73,7 +73,7 @@ macro_rules! declare_err {
impl Error {
/// Returns the kernel error code.
pub fn to_kernel_errno(self) -> core::ffi::c_int {
pub fn to_errno(self) -> core::ffi::c_int {
self.0
}
}
......
......@@ -278,7 +278,7 @@ fn __init() -> core::ffi::c_int {{
return 0;
}}
Err(e) => {{
return e.to_kernel_errno();
return e.to_errno();
}}
}}
}}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment