diff options
author | Donald Robson <donald.robson@imgtec.com> | 2023-11-30 16:00:13 +0000 |
---|---|---|
committer | Maxime Ripard <mripard@kernel.org> | 2023-12-04 09:41:34 +0100 |
commit | 51097ef14d4e555c532ae535d24f97cc19c8c5a6 (patch) | |
tree | 080c86a38a132a66985283b550ccfb9765ac7560 /scripts/generate_rust_target.rs | |
parent | 93032ae634d409e621c68a2fb7d6930e7eebb1d9 (diff) |
drm/imagination: Fixed warning due to implicit cast to bool
This line appears to confuse the compiler and had been noticed previously in
clang-tidy output. There isn't anything fundamentally wrong that I can see.
I suspect that it just looks like a mistake - hence the first note. By making
the second operand an actual bool result, const correctness can be preserved
while silencing the warning.
>> drivers/gpu/drm/imagination/pvr_device_info.c:230:47: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
230 | } else if (features_size == mapping_max_size && (mapping_max & 63)) {
| ^ ~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/imagination/pvr_device_info.c:230:47: note: use '&' for a bitwise operation
230 | } else if (features_size == mapping_max_size && (mapping_max & 63)) {
| ^~
| &
drivers/gpu/drm/imagination/pvr_device_info.c:230:47: note: remove constant to silence this warning
230 | } else if (features_size == mapping_max_size && (mapping_max & 63)) {
| ~^~~~~~~~~~~~~~~~~~~~~
1 warning generated.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202311241752.3iLyyFcA-lkp@intel.com/
Fixes: f99f5f3ea7ef ("drm/imagination: Add GPU ID parsing and firmware loading")
Signed-off-by: Donald Robson <donald.robson@imgtec.com>
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20231130160017.259902-1-donald.robson@imgtec.com
Diffstat (limited to 'scripts/generate_rust_target.rs')
0 files changed, 0 insertions, 0 deletions