diff options
| author | John Hubbard <jhubbard@nvidia.com> | 2026-04-04 14:28:29 -0700 |
|---|---|---|
| committer | Danilo Krummrich <dakr@kernel.org> | 2026-04-05 16:23:43 +0200 |
| commit | 6b9a10d6f0a131a8ea6beae559a31084840b063d (patch) | |
| tree | bd83a8813f4abd32456354ce48a504adb270ed1f /tools/testing/vma/include/git@git.tavy.me:linux.git | |
| parent | de0aca13509bf47a2d49bc7a26d56079c758c95f (diff) | |
gpu: nova-core: vbios: use from_le_bytes() for PCI ROM header parsing
Clippy fires two clippy::precedence warnings on the manual
byte-shifting expression:
warning: operator precedence can trip the unwary
--> drivers/gpu/nova-core/vbios.rs:511:17
|
511 | / u32::from(data[29]) << 24
512 | | | u32::from(data[28]) << 16
513 | | | u32::from(data[27]) << 8
| |______________________________________________^
Clear the warnings by replacing manual byte-shifting with
u32::from_le_bytes(). Using from_le_bytes() is also a tiny code
improvement, because it uses less code and is clearer about the intent.
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
Link: https://patch.msgid.link/20260404212831.78971-2-jhubbard@nvidia.com
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'tools/testing/vma/include/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
