Message ID | 20250528174953.2948570-1-y.j3ms.n@gmail.com |
---|---|
State | New |
Headers | show |
Series | [v3] rust: kunit: use crate-level mapping for `c_void` | expand |
On Wed, May 28, 2025 at 7:51 PM Jesung Yang <y.j3ms.n@gmail.com> wrote: > > 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 <lossin@kernel.org> > Signed-off-by: Jesung Yang <y.j3ms.n@gmail.com> > Link: https://rust-for-linux.zulipchat.com/#narrow/channel/288089/topic/x/near/520452733 Looks good to me, thanks! If KUnit picks this next cycle: Acked-by: Miguel Ojeda <ojeda@kernel.org> Otherwise, I am happy to take it too. Cheers, Miguel
diff --git a/rust/kernel/kunit.rs b/rust/kernel/kunit.rs index 4b8cdcb21e77..603330f247c7 100644 --- a/rust/kernel/kunit.rs +++ b/rust/kernel/kunit.rs @@ -7,7 +7,7 @@ //! Reference: <https://docs.kernel.org/dev-tools/kunit/index.html> use crate::prelude::*; -use core::{ffi::c_void, fmt}; +use core::fmt; /// Prints a KUnit error-level message. ///