diff options
author | Alice Ryhl <aliceryhl@google.com> | 2025-03-03 08:45:15 +0000 |
---|---|---|
committer | Miguel Ojeda <ojeda@kernel.org> | 2025-03-09 20:52:46 +0100 |
commit | 92d2873bedf33974b04530215692705185ec6572 (patch) | |
tree | da619cc1cc1ee67078f06aea262d2e00a57a5219 /rust/kernel | |
parent | 44e333fe464a253f703982f721c7155218f63d1f (diff) | |
download | linux-92d2873bedf33974b04530215692705185ec6572.tar.gz linux-92d2873bedf33974b04530215692705185ec6572.tar.bz2 linux-92d2873bedf33974b04530215692705185ec6572.zip |
print: use new #[export] macro for rust_fmt_argument
This moves the rust_fmt_argument function over to use the new #[export]
macro, which will verify at compile-time that the function signature
matches what is in the header file.
Reviewed-by: Andreas Hindborg <a.hindborg@kernel.org>
Reviewed-by: Tamir Duberstein <tamird@gmail.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Acked-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20250303-export-macro-v3-4-41fbad85a27f@google.com
[ Removed period as requested by Andy. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'rust/kernel')
-rw-r--r-- | rust/kernel/print.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/rust/kernel/print.rs b/rust/kernel/print.rs index 61ee36c5e5f5..cf4714242e14 100644 --- a/rust/kernel/print.rs +++ b/rust/kernel/print.rs @@ -8,13 +8,14 @@ use crate::{ ffi::{c_char, c_void}, + prelude::*, str::RawFormatter, }; use core::fmt; // Called from `vsprintf` with format specifier `%pA`. #[expect(clippy::missing_safety_doc)] -#[no_mangle] +#[export] unsafe extern "C" fn rust_fmt_argument( buf: *mut c_char, end: *mut c_char, |