[PATCH] miscdevice: rust: use build_error! macro instead of function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

This use the macro with the kernel:: prefix as it has not yet been added
to the prelude.

Link: https://lore.kernel.org/all/20241123222849.350287-2-ojeda@xxxxxxxxxx/ [1]
Signed-off-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>
---
 rust/kernel/miscdevice.rs | 6 +++---
 1 file 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 @@ fn ioctl(
         _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 @@ fn compat_ioctl(
         _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 @@ fn show_fdinfo(
         _m: &SeqFile,
         _file: &File,
     ) {
-        kernel::build_error(VTABLE_DEFAULT_ERROR)
+        kernel::build_error!(VTABLE_DEFAULT_ERROR)
     }
 }
 

base-commit: 7687c66c18c66d4ccd9949c6f641c0e7b5773483
-- 
2.47.1.613.gc27f4b7a9f-goog





[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux