Re: [PATCH] rust: prelude: add bit function

From: Wedson Almeida Filho
Date: Tue Jan 30 2024 - 15:04:37 EST


On Tue, 30 Jan 2024 at 16:48, Christina Quast
<contact@xxxxxxxxxxxxxxxxxx> wrote:
>
> In order to create masks easily, the define BIT() is used in C code.
> This commit adds the same functionality to the rust kernel.

The `rust` branch has a generic `bit` function that allows the
returned bit to be used with or converted to several numeric types.

https://github.com/Rust-for-Linux/linux/blob/rust/rust/kernel/types.rs#L344