Skip to content

Commit 5d4ffc5

Browse files
J3m3ojeda
authored andcommitted
rust: kunit: use crate-level mapping for c_void
Remove `use core::ffi::c_void`, which shadows `kernel::ffi::c_void` brought in via `use crate::prelude::*`, to maintain consistency and centralize the abstraction. Since `kernel::ffi::c_void` is a straightforward re-export of `core::ffi::c_void`, both are functionally equivalent. However, using `kernel::ffi::c_void` improves consistency across the kernel's Rust code and provides a unified reference point in case the definition ever needs to change, even if such a change is unlikely. Reviewed-by: Benno Lossin <[email protected]> Link: https://rust-for-linux.zulipchat.com/#narrow/channel/288089/topic/x/near/520452733 Signed-off-by: Jesung Yang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Miguel Ojeda <[email protected]>
1 parent dc35ddc commit 5d4ffc5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rust/kernel/kunit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//! Reference: <https://docs.kernel.org/dev-tools/kunit/index.html>
88
99
use crate::prelude::*;
10-
use core::{ffi::c_void, fmt};
10+
use core::fmt;
1111

1212
#[cfg(CONFIG_PRINTK)]
1313
use crate::c_str;

0 commit comments

Comments
 (0)