summaryrefslogtreecommitdiff
path: root/rust/kernel
diff options
context:
space:
mode:
authorAlice Ryhl <aliceryhl@google.com>2025-01-10 10:14:59 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-01-10 13:23:57 +0100
commitbf2aa7df2687a24ebb52cec4a24443121ac3126d (patch)
tree2abb2cba551f54b4dc9fb44bd87b37cf32578569 /rust/kernel
parentc1ecb860a48d0bf56b0fc8391c5d59b0c3b42516 (diff)
miscdevice: rust: use build_error! macro instead of function
The function called build_error is an implementation detail of the macro of the same name. Thus, update miscdevice to use the macro rather than the function. See [1] for more information on this. These use the macro with the kernel:: prefix as it has not yet been added to the prelude. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Link: https://lore.kernel.org/r/20250110162828.38614c1b@canb.auug.org.au Link: https://lore.kernel.org/all/20241123222849.350287-2-ojeda@kernel.org/ [1] Signed-off-by: Alice Ryhl <aliceryhl@google.com> Acked-by: Miguel Ojeda <ojeda@kernel.org> Link: https://lore.kernel.org/r/20250110101459.536726-1-aliceryhl@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'rust/kernel')
-rw-r--r--rust/kernel/miscdevice.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/rust/kernel/miscdevice.rs b/rust/kernel/miscdevice.rs
index ebc82e7dfc80..dfb363630c70 100644
--- a/rust/kernel/miscdevice.rs
+++ b/rust/kernel/miscdevice.rs
@@ -134,7 +134,7 @@ pub trait MiscDevice: Sized {
_cmd: u32,
_arg: usize,
) -> Result<isize> {
- kernel::build_error(VTABLE_DEFAULT_ERROR)
+ kernel::build_error!(VTABLE_DEFAULT_ERROR)
}
/// Handler for ioctls.
@@ -151,7 +151,7 @@ pub trait MiscDevice: Sized {
_cmd: u32,
_arg: usize,
) -> Result<isize> {
- kernel::build_error(VTABLE_DEFAULT_ERROR)
+ kernel::build_error!(VTABLE_DEFAULT_ERROR)
}
/// Show info for this fd.
@@ -160,7 +160,7 @@ pub trait MiscDevice: Sized {
_m: &SeqFile,
_file: &File,
) {
- kernel::build_error(VTABLE_DEFAULT_ERROR)
+ kernel::build_error!(VTABLE_DEFAULT_ERROR)
}
}