Alice Ryhl
8ba426f170
rust: fix signature of rust_fmt_argument
...
[ Upstream commit 901b3290bd ]
Without this change, the rest of this series will emit the following
error message:
error[E0308]: `if` and `else` have incompatible types
--> <linux>/rust/kernel/print.rs:22:22
|
21 | #[export]
| --------- expected because of this
22 | unsafe extern "C" fn rust_fmt_argument(
| ^^^^^^^^^^^^^^^^^ expected `u8`, found `i8`
|
= note: expected fn item `unsafe extern "C" fn(*mut u8, *mut u8, *mut c_void) -> *mut u8 {bindings::rust_fmt_argument}`
found fn item `unsafe extern "C" fn(*mut i8, *mut i8, *const c_void) -> *mut i8 {print::rust_fmt_argument}`
The error may be different depending on the architecture.
To fix this, change the void pointer argument to use a const pointer,
and change the imports to use crate::ffi instead of core::ffi for
integer types.
Fixes: 787983da77 ("vsprintf: add new `%pA` format specifier")
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-1-41fbad85a27f@google.com
Signed-off-by: Miguel Ojeda <ojeda@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2025-04-10 14:39:20 +02:00
..
2025-04-10 14:39:19 +02:00
2024-10-21 09:59:43 -07:00
2024-09-01 20:43:40 -07:00
2024-06-24 13:18:02 +02:00
2024-12-09 10:41:01 +01:00
2024-10-02 17:23:23 -04:00
2024-10-02 17:23:23 -04:00
2024-09-21 08:20:50 -07:00
2024-10-02 17:23:23 -04:00
2024-05-19 14:36:18 -07:00
2024-08-15 09:26:02 -07:00
2024-09-13 17:28:35 +02:00
2024-10-02 17:23:23 -04:00
2024-07-04 23:43:11 -07:00
2024-07-03 19:30:23 -07:00
2024-10-02 17:23:23 -04:00
2024-08-15 09:26:02 -07:00
2024-07-16 14:24:29 -07:00
2024-06-24 22:25:06 -07:00
2024-06-24 22:25:06 -07:00
2025-02-17 10:05:14 +01:00
2024-09-01 20:43:33 -07:00
2024-07-12 16:39:53 -07:00
2024-06-24 22:25:06 -07:00
2024-07-12 08:55:02 +09:00
2024-07-28 15:49:18 -07:00
2024-07-06 11:39:51 -07:00
2024-10-17 21:30:32 +02:00
2024-09-01 20:43:30 -07:00
2024-09-01 20:43:29 -07:00
2024-06-24 22:25:06 -07:00
2024-04-09 22:06:00 -07:00
2024-10-17 00:28:07 -07:00
2024-06-18 10:40:52 -07:00
2024-09-09 16:40:26 +02:00
2024-07-26 14:33:09 -07:00
2024-10-02 17:23:23 -04:00
2024-07-28 15:49:18 -07:00
2024-10-02 17:23:23 -04:00
2024-09-01 20:43:27 -07:00
2024-04-25 21:07:06 -07:00
2024-06-24 22:25:11 -07:00
2024-07-30 09:30:11 -10:00
2024-09-01 20:43:29 -07:00
2024-04-15 11:19:53 -07:00
2024-09-01 20:43:33 -07:00
2024-06-18 10:40:52 -07:00
2024-05-21 15:29:01 -07:00
2024-09-01 20:25:44 -07:00
2024-09-09 09:41:47 -04:00
2024-09-09 16:47:41 -07:00
2024-06-24 22:25:06 -07:00
2024-10-02 17:23:23 -04:00
2024-04-22 17:11:20 -03:00
2025-02-27 04:30:22 -08:00
2024-08-20 17:13:40 +02:00
2024-06-24 22:25:06 -07:00
2024-06-25 17:15:06 -07:00
2025-02-17 10:04:44 +01:00
2024-10-23 16:04:30 +01:00
2024-04-25 21:07:05 -07:00
2024-08-06 13:42:40 +02:00
2024-05-22 11:53:02 -07:00
2024-06-12 13:24:05 +02:00
2024-09-12 12:20:21 +02:00
2024-09-26 14:01:44 -07:00
2024-09-01 20:43:29 -07:00
2024-09-21 08:20:50 -07:00
2025-02-17 10:05:42 +01:00
2024-06-24 22:25:05 -07:00
2024-06-10 11:14:52 +01:00
2024-11-07 14:14:58 -08:00
2024-12-05 14:02:45 +01:00
2024-09-01 20:43:34 -07:00
2024-06-24 22:25:10 -07:00
2024-10-02 17:23:23 -04:00
2024-07-04 23:43:10 -07:00
2025-03-07 18:25:43 +01:00
2025-02-08 09:57:35 +01:00
2024-09-20 00:20:06 -06:00
2024-09-12 12:20:21 +02:00
2024-06-24 22:25:07 -07:00
2024-10-02 17:23:23 -04:00
2024-10-23 09:50:58 +02:00
2024-06-24 22:25:03 -07:00
2024-12-14 20:03:32 +01:00
2025-04-10 14:39:11 +02:00
2024-06-28 08:54:55 -07:00
2024-12-05 14:03:01 +01:00
2024-06-28 08:54:55 -07:00
2024-10-02 17:23:23 -04:00
2024-12-05 14:02:12 +01:00
2024-08-19 11:31:18 -07:00
2024-06-18 10:40:52 -07:00
2024-05-09 09:25:08 -07:00
2024-08-28 06:54:39 -07:00
2024-06-24 22:25:11 -07:00
2024-09-03 11:36:43 +02:00
2024-06-04 17:40:02 +02:00
2024-06-24 22:25:11 -07:00
2024-09-01 20:43:40 -07:00
2024-05-19 14:36:20 -07:00
2024-05-19 14:36:20 -07:00
2024-06-24 22:25:11 -07:00
2024-06-24 22:25:11 -07:00
2024-06-24 22:25:11 -07:00
2024-09-01 20:25:52 -07:00
2024-06-24 22:25:11 -07:00
2024-06-24 22:25:07 -07:00
2024-06-24 22:25:11 -07:00
2024-06-24 22:25:07 -07:00
2024-06-24 22:25:11 -07:00
2024-07-03 19:30:05 -07:00
2024-06-24 22:25:11 -07:00
2024-06-24 22:25:11 -07:00
2024-06-24 22:25:11 -07:00
2024-06-24 22:25:11 -07:00
2024-06-10 11:14:52 +01:00
2024-09-01 20:43:23 -07:00
2024-09-03 21:15:42 -07:00
2024-06-24 22:25:11 -07:00
2024-06-03 18:51:18 -07:00
2024-06-12 13:26:28 +02:00
2024-06-24 22:25:11 -07:00
2024-06-24 22:25:11 -07:00
2024-06-24 22:25:11 -07:00
2024-06-24 22:25:11 -07:00
2024-07-03 19:30:05 -07:00
2024-06-24 22:25:06 -07:00
2024-07-03 19:30:05 -07:00
2024-06-24 22:25:11 -07:00
2024-06-24 22:25:04 -07:00
2024-06-24 22:25:04 -07:00
2024-06-24 22:25:04 -07:00
2024-04-15 17:42:43 -07:00
2024-04-24 15:45:38 -07:00
2024-07-30 13:04:36 -10:00
2024-07-02 10:11:45 -06:00
2024-07-08 23:44:01 +02:00
2025-04-10 14:39:20 +02:00
2024-05-19 09:21:03 -07:00
2024-10-02 17:23:23 -04:00