Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Alice Ryhl and committed by
Greg Kroah-Hartman
bf2aa7df c1ecb860

+3 -3
+3 -3
rust/kernel/miscdevice.rs
··· 134 134 _cmd: u32, 135 135 _arg: usize, 136 136 ) -> Result<isize> { 137 - kernel::build_error(VTABLE_DEFAULT_ERROR) 137 + kernel::build_error!(VTABLE_DEFAULT_ERROR) 138 138 } 139 139 140 140 /// Handler for ioctls. ··· 151 151 _cmd: u32, 152 152 _arg: usize, 153 153 ) -> Result<isize> { 154 - kernel::build_error(VTABLE_DEFAULT_ERROR) 154 + kernel::build_error!(VTABLE_DEFAULT_ERROR) 155 155 } 156 156 157 157 /// Show info for this fd. ··· 160 160 _m: &SeqFile, 161 161 _file: &File, 162 162 ) { 163 - kernel::build_error(VTABLE_DEFAULT_ERROR) 163 + kernel::build_error!(VTABLE_DEFAULT_ERROR) 164 164 } 165 165 } 166 166