[PATCH] drm/xe : Fix mixed enum type warning
Himal Prasad Ghimiray
himal.prasad.ghimiray at intel.com
Thu Mar 21 11:32:10 UTC 2024
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 at intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray at 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
More information about the Intel-xe
mailing list