Re: [PATCH v2] rust: impl_flags: use bit helper in example

Miguel Ojeda <[email protected]>
Newsgroups org.kernel.vger.rust-for-linux,org.kernel.vger.linux-kernel
Message-ID <CANiq72=01dZYTOiS4pv38g_FM+WCCDyFsB6up+xv1NSD=YifOA@mail.gmail.com>
On Sat, Jul 11, 2026 at 10:23 AM Kosumi Chan <[email protected]> wrote:
>
> Use bit_u32() instead of open-coding shifts in the impl_flags! example.
> This demonstrates the checked bit helper and ensures that bit positions
> remain within the underlying u32 type.
>
> Suggested-by: Miguel Ojeda <[email protected]>
> Link: https://github.com/Rust-for-Linux/linux/issues/1244
> Assisted-by: OpenCode:openai/gpt-5.6-sol
> Signed-off-by: Kosumi Chan <[email protected]>

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

Cheers,
Miguel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.