lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <04d39182-80ca-4656-aded-2a83353aef85@nvidia.com>
Date: Wed, 22 Oct 2025 12:12:54 -0400
From: Joel Fernandes <joelagnelf@...dia.com>
To: Alexandre Courbot <acourbot@...dia.com>,
 Danilo Krummrich <dakr@...nel.org>, Alice Ryhl <aliceryhl@...gle.com>,
 Edwin Peer <epeer@...dia.com>
Cc: John Hubbard <jhubbard@...dia.com>, Alistair Popple <apopple@...dia.com>,
 Timur Tabi <ttabi@...dia.com>, nouveau@...ts.freedesktop.org,
 dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
 rust-for-linux@...r.kernel.org
Subject: Re: [PATCH 1/3] gpu: nova-core: bitfield: simplify condition



On 10/22/2025 6:50 AM, Alexandre Courbot wrote:
> This condition was uselessly convoluted.
> 
> Reported-by: Edwin Peer <epeer@...dia.com>
> Link: https://lore.kernel.org/rust-for-linux/F3853912-2C1C-4F9B-89B0-3168689F35B3@nvidia.com/
> Signed-off-by: Alexandre Courbot <acourbot@...dia.com>


Reviewed-by: Joel Fernandes <joelagnelf@...dia.com>

Thanks.



> ---
>  drivers/gpu/nova-core/bitfield.rs | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/nova-core/bitfield.rs b/drivers/gpu/nova-core/bitfield.rs
> index 25579b4c328f..136de7289162 100644
> --- a/drivers/gpu/nova-core/bitfield.rs
> +++ b/drivers/gpu/nova-core/bitfield.rs
> @@ -203,7 +203,7 @@ impl $name {
>      ) => {
>          bitfield!(
>              @leaf_accessor $vis $name $storage, $hi:$lo $field
> -            { |f| <$into_type>::from(if f != 0 { true } else { false }) }
> +            { |f| <$into_type>::from(f != 0) }
>              bool $into_type => $into_type $(, $comment)?;
>          );
>      };
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ