From: Joel Fernandes <joelagnelf@nvidia.com>
To: Alexandre Courbot <acourbot@nvidia.com>,
Danilo Krummrich <dakr@kernel.org>,
Alice Ryhl <aliceryhl@google.com>, Edwin Peer <epeer@nvidia.com>
Cc: John Hubbard <jhubbard@nvidia.com>,
Alistair Popple <apopple@nvidia.com>,
Timur Tabi <ttabi@nvidia.com>,
nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org
Subject: Re: [PATCH 1/3] gpu: nova-core: bitfield: simplify condition
Date: Wed, 22 Oct 2025 12:12:54 -0400 [thread overview]
Message-ID: <04d39182-80ca-4656-aded-2a83353aef85@nvidia.com> (raw)
In-Reply-To: <20251022-nova-bitfield-v1-1-73bc0988667b@nvidia.com>
On 10/22/2025 6:50 AM, Alexandre Courbot wrote:
> This condition was uselessly convoluted.
>
> Reported-by: Edwin Peer <epeer@nvidia.com>
> Link: https://lore.kernel.org/rust-for-linux/F3853912-2C1C-4F9B-89B0-3168689F35B3@nvidia.com/
> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Reviewed-by: Joel Fernandes <joelagnelf@nvidia.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)?;
> );
> };
>
next prev parent reply other threads:[~2025-10-22 16:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-22 10:50 [PATCH 0/3] gpu: nova-core: various bitfield fixes Alexandre Courbot
2025-10-22 10:50 ` [PATCH 1/3] gpu: nova-core: bitfield: simplify condition Alexandre Courbot
2025-10-22 16:12 ` Joel Fernandes [this message]
2025-10-22 10:50 ` [PATCH 2/3] gpu: nova-core: bitfield: simplify expression Alexandre Courbot
2025-10-22 16:12 ` Joel Fernandes
2025-10-22 10:50 ` [PATCH 3/3] gpu: nova-core: bitfield: remove BitOr implementation Alexandre Courbot
2025-10-22 16:11 ` Joel Fernandes
2025-10-22 16:19 ` [PATCH 0/3] gpu: nova-core: various bitfield fixes Danilo Krummrich
2025-10-27 0:55 ` Alexandre Courbot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=04d39182-80ca-4656-aded-2a83353aef85@nvidia.com \
--to=joelagnelf@nvidia.com \
--cc=acourbot@nvidia.com \
--cc=aliceryhl@google.com \
--cc=apopple@nvidia.com \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=epeer@nvidia.com \
--cc=jhubbard@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nouveau@lists.freedesktop.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=ttabi@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®