Re: [PATCH v3] rust: kunit: use crate-level mapping for `c_void`

From: Miguel Ojeda
Date: Mon Jun 23 2025 - 19:12:27 EST


On Wed, May 28, 2025 at 7:51 PM Jesung Yang <y.j3ms.n@xxxxxxxxx> 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@xxxxxxxxxx>
> Signed-off-by: Jesung Yang <y.j3ms.n@xxxxxxxxx>
> Link: https://rust-for-linux.zulipchat.com/#narrow/channel/288089/topic/x/near/520452733

Applied to `rust-next` -- thanks everyone!

Cheers,
Miguel