[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <067C1035-2FD5-4186-A45C-F6F7444F05E2@collabora.com>
Date: Wed, 2 Jul 2025 10:05:33 -0300
From: Daniel Almeida <daniel.almeida@...labora.com>
To: Alice Ryhl <aliceryhl@...gle.com>
Cc: 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>,
Andreas Hindborg <a.hindborg@...nel.org>,
Trevor Gross <tmgross@...ch.edu>,
Danilo Krummrich <dakr@...nel.org>,
Alexandre Courbot <acourbot@...dia.com>,
Benno Lossin <lossin@...nel.org>,
linux-kernel@...r.kernel.org,
rust-for-linux@...r.kernel.org
Subject: Re: [PATCH v7] rust: kernel: add support for bits/genmask macros
Hi Alice,
> On 2 Jul 2025, at 07:27, Alice Ryhl <aliceryhl@...gle.com> wrote:
>
> On Mon, Jun 23, 2025 at 10:18 PM Daniel Almeida
> <daniel.almeida@...labora.com> wrote:
>>
>> In light of bindgen being unable to generate bindings for macros, and
>> owing to the widespread use of these macros in drivers, manually define
>> the bit and genmask C macros in Rust.
>>
>> The *_checked version of the functions provide runtime checking while
>> the const version performs compile-time assertions on the arguments via
>> the build_assert!() macro.
>>
>> Signed-off-by: Daniel Almeida <daniel.almeida@...labora.com>
>
> Is it intentional that the macros are not available for usize?
>
> Reviewed-by: Alice Ryhl <aliceryhl@...gle.com>
Not intentional, but do we need it?
I really have no idea whether it’d be useful really.
— Daniel
Powered by blists - more mailing lists