Re: [PATCH v8 2/2] rust: add dma coherent allocator abstraction.

Miguel Ojeda
2025-01-09T11:32:22Z

On Thu, Jan 9, 2025 at 12:14 PM Abdiel Janulgue
<abdiel.janulgue@gmail.com> wrote:
>
> using usize as suggested by the compiler. Maybe we should stick to
> ffi::c_ulong return type for Attrs::as_raw() to be in sync the
> bindgen-generated interface?

In the past, `bindgen` also generated code using the `core::ffi::`
mapping, but now uses it uses the `ffi` (the crate) instead (starting
with commit d072acda4862 ("rust: use custom FFI integer types") in
mainline).

Note that in mainline, `ffi` (the crate) still redirects to
`core::ffi`, since we split the change in 2 kernel cycles to make it
easier to migrate. But in `rust-next`, `ffi` (the crate) already uses
the new mapping.

The idea is that you can already use `ffi` (the crate) -- so please use that.

I hope that helps!

Cheers,
Miguel