[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANiq72kiUgLacBf9i3Dt+OPLZEyksc3s==HRp5R3EB74VuZu9A@mail.gmail.com>
Date: Thu, 9 Jan 2025 12:32:10 +0100
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Abdiel Janulgue <abdiel.janulgue@...il.com>
Cc: Daniel Almeida <daniel.almeida@...labora.com>, Daniel Sedlak <daniel@...lak.dev>,
aliceryhl@...gle.com, robin.murphy@....com, rust-for-linux@...r.kernel.org,
Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>,
Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <benno.lossin@...ton.me>, Andreas Hindborg <a.hindborg@...nel.org>,
Trevor Gross <tmgross@...ch.edu>, Danilo Krummrich <dakr@...nel.org>,
Valentin Obst <kernel@...entinobst.de>, open list <linux-kernel@...r.kernel.org>,
Christoph Hellwig <hch@....de>, Marek Szyprowski <m.szyprowski@...sung.com>, airlied@...hat.com,
"open list:DMA MAPPING HELPERS" <iommu@...ts.linux.dev>
Subject: Re: [PATCH v8 2/2] rust: add dma coherent allocator abstraction.
On Thu, Jan 9, 2025 at 12:14 PM Abdiel Janulgue
<abdiel.janulgue@...il.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
Powered by blists - more mailing lists