[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250110101459.536726-1-aliceryhl@google.com>
Date: Fri, 10 Jan 2025 10:14:59 +0000
From: Alice Ryhl <aliceryhl@...gle.com>
To: gregkh@...uxfoundation.org
Cc: aliceryhl@...gle.com, linux-kernel@...r.kernel.org,
linux-next@...r.kernel.org, ojeda@...nel.org, sfr@...b.auug.org.au
Subject: [PATCH] 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.
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@kernel.org/ [1]
Signed-off-by: Alice Ryhl <aliceryhl@...gle.com>
---
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
Powered by blists - more mailing lists