Commit bf2aa7df authored by Alice Ryhl's avatar Alice Ryhl Committed by Greg Kroah-Hartman
Browse files

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: default avatarStephen 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: default avatarAlice Ryhl <aliceryhl@google.com>
Acked-by: default avatarMiguel Ojeda <ojeda@kernel.org>
Link: https://lore.kernel.org/r/20250110101459.536726-1-aliceryhl@google.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c1ecb860
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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)
    }
}