projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
76544ef
)
gpu: nova-core: bitfield: simplify condition
author
Alexandre Courbot
<acourbot@nvidia.com>
Wed, 22 Oct 2025 10:50:56 +0000
(19:50 +0900)
committer
Alexandre Courbot
<acourbot@nvidia.com>
Sat, 25 Oct 2025 04:16:31 +0000
(13:16 +0900)
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/
Reviewed-by: Joel Fernandes <joelagnelf@nvidia.com>
Reviewed-by: Danilo Krummrich <dakr@kernel.org>
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Message-ID: <
20251022
-nova-bitfield-v1-1-
73bc0988667b
@nvidia.com>
drivers/gpu/nova-core/bitfield.rs
patch
|
blob
|
history
diff --git
a/drivers/gpu/nova-core/bitfield.rs
b/drivers/gpu/nova-core/bitfield.rs
index
25579b4
..
136de72
100644
(file)
--- a/
drivers/gpu/nova-core/bitfield.rs
+++ b/
drivers/gpu/nova-core/bitfield.rs
@@
-203,7
+203,7
@@
macro_rules! bitfield {
) => {
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)?;
);
};