[PATCH 2/3] rust: num: add the `last_set_bit` operation

Benno Lossin lossin at kernel.org
Sun Jun 22 08:12:57 UTC 2025


On Fri Jun 20, 2025 at 3:14 PM CEST, Alexandre Courbot wrote:
> Add an equivalent to the `fls` (Find Last Set bit) C function to Rust
> unsigned types.
>
> It is to be first used by the nova-core driver.
>
> Signed-off-by: Alexandre Courbot <acourbot at nvidia.com>

Reviewed-by: Benno Lossin <lossin at kernel.org>

---
Cheers,
Benno

> ---
>  rust/kernel/num.rs | 38 ++++++++++++++++++++++++++++++++++++++
>  1 file changed, 38 insertions(+)


More information about the Nouveau mailing list