diff mbox series

[1/5] drm/imagination: Fixed warning due to implicit cast to bool

Message ID 20231129153703.162642-1-donald.robson@imgtec.com (mailing list archive)
State New, archived
Headers show
Series [1/5] drm/imagination: Fixed warning due to implicit cast to bool | expand

Commit Message

Donald Robson Nov. 29, 2023, 3:36 p.m. UTC
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202311241752.3iLyyFcA-lkp@intel.com/
Fixes: 1ff76f7a5b45 ("drm/imagination: Add GPU ID parsing and firmware loading")
Signed-off-by: Donald Robson <donald.robson@imgtec.com>
---
 drivers/gpu/drm/imagination/pvr_device_info.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Maxime Ripard Nov. 30, 2023, 9:28 a.m. UTC | #1
Hi Donald,

It looks better, thanks :)

On Wed, Nov 29, 2023 at 03:36:59PM +0000, Donald Robson wrote:
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202311241752.3iLyyFcA-lkp@intel.com/
> Fixes: 1ff76f7a5b45 ("drm/imagination: Add GPU ID parsing and firmware loading")
> Signed-off-by: Donald Robson <donald.robson@imgtec.com>

However, we'll want some commit logs for all of these. You can have a
look at Arnd's which are very good example of what we expect, but some
small description of the issue, the fix and the warning from the
compiler is usually what we go for.

Thanks!
Maxime
Maxime Ripard Dec. 1, 2023, 8:36 a.m. UTC | #2
On Wed, 29 Nov 2023 15:36:59 +0000, Donald Robson wrote:
> 


Applied to drm/drm-misc (drm-misc-next).

Thanks!
Maxime
diff mbox series

Patch

diff --git a/drivers/gpu/drm/imagination/pvr_device_info.c b/drivers/gpu/drm/imagination/pvr_device_info.c
index 11e6bef52ecd..d3301cde7d11 100644
--- a/drivers/gpu/drm/imagination/pvr_device_info.c
+++ b/drivers/gpu/drm/imagination/pvr_device_info.c
@@ -227,7 +227,8 @@  int pvr_device_info_set_features(struct pvr_device *pvr_dev, const u64 *features
 	/* Verify no unsupported values in the bitmask. */
 	if (features_size > mapping_max_size) {
 		drm_warn(from_pvr_device(pvr_dev), "Unsupported features in firmware image");
-	} else if (features_size == mapping_max_size && (mapping_max & 63)) {
+	} else if (features_size == mapping_max_size &&
+		   ((mapping_max & 63) != 0)) {
 		u64 invalid_mask = ~0ull << (mapping_max & 63);
 
 		if (features[features_size - 1] & invalid_mask)