summary refs log tree commit diff
path: root/rust/kernel/print.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust/kernel/print.rs')
-rw-r--r--rust/kernel/print.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/rust/kernel/print.rs b/rust/kernel/print.rs
index 97ff086ba22e..b6d1c12136de 100644
--- a/rust/kernel/print.rs
+++ b/rust/kernel/print.rs
@@ -18,7 +18,11 @@ use crate::bindings;
 
 // Called from `vsprintf` with format specifier `%pA`.
 #[no_mangle]
-unsafe fn rust_fmt_argument(buf: *mut c_char, end: *mut c_char, ptr: *const c_void) -> *mut c_char {
+unsafe extern "C" fn rust_fmt_argument(
+    buf: *mut c_char,
+    end: *mut c_char,
+    ptr: *const c_void,
+) -> *mut c_char {
     use fmt::Write;
     // SAFETY: The C contract guarantees that `buf` is valid if it's less than `end`.
     let mut w = unsafe { RawFormatter::from_ptrs(buf.cast(), end.cast()) };