Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe : Fix mixed enum type warning
@ 2024-03-21 11:32 Himal Prasad Ghimiray
  2024-03-21 12:51 ` ✓ CI.Patch_applied: success for " Patchwork
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Himal Prasad Ghimiray @ 2024-03-21 11:32 UTC (permalink / raw)
  To: intel-xe; +Cc: Himal Prasad Ghimiray, Zhanjun Dong, Rodrigo Vivi

The issue arises from comparing an unsigned integer with a macro-defined
value. To address this, cast the macro-defined value to the same data
type as the other operand.

Cc: Zhanjun Dong <zhanjun.dong@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
---
Coverity Reports "Parse warning (PW.MIXED_ENUM_TYPE)
1. mixed_enum_type enumerated type mixed with another type"

 drivers/gpu/drm/xe/xe_gt_mcr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_gt_mcr.c b/drivers/gpu/drm/xe/xe_gt_mcr.c
index 866bbd26ba3f..027cb60c60c1 100644
--- a/drivers/gpu/drm/xe/xe_gt_mcr.c
+++ b/drivers/gpu/drm/xe/xe_gt_mcr.c
@@ -311,7 +311,7 @@ void xe_gt_mcr_get_dss_steering(struct xe_gt *gt, unsigned int dss, u16 *group,
 {
 	int dss_per_grp = dss_per_group(gt);
 
-	xe_gt_assert(gt, dss < XE_MAX_DSS_FUSE_BITS);
+	xe_gt_assert(gt, dss < (unsigned int)XE_MAX_DSS_FUSE_BITS);
 
 	*group = dss / dss_per_grp;
 	*instance = dss % dss_per_grp;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-03-21 13:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-21 11:32 [PATCH] drm/xe : Fix mixed enum type warning Himal Prasad Ghimiray
2024-03-21 12:51 ` ✓ CI.Patch_applied: success for " Patchwork
2024-03-21 12:51 ` ✓ CI.checkpatch: " Patchwork
2024-03-21 12:51 ` [PATCH] " Jani Nikula
2024-03-21 12:52 ` ✓ CI.KUnit: success for " Patchwork
2024-03-21 13:03 ` ✓ CI.Build: " Patchwork
2024-03-21 13:06 ` ✓ CI.Hooks: " Patchwork
2024-03-21 13:09 ` ✓ CI.checksparse: " Patchwork
2024-03-21 13:37 ` ✓ CI.BAT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox