[Intel-gfx] [PATCH] drm/i915/guc: fix compile issue of guc_klvs_abi.h

Linyu Yuan quic_linyyuan at quicinc.com
Fri Aug 25 05:00:29 UTC 2023


GCC report GUC_KLV_0_KEY and GUC_KLV_0_LEN is not constant when do
preprocessing.

Change to use GENMASK() to avoid the issue.

Signed-off-by: Linyu Yuan <quic_linyyuan at quicinc.com>
---
 drivers/gpu/drm/i915/gt/uc/abi/guc_klvs_abi.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/uc/abi/guc_klvs_abi.h b/drivers/gpu/drm/i915/gt/uc/abi/guc_klvs_abi.h
index 58012edd4eb0..fd3c16695e5f 100644
--- a/drivers/gpu/drm/i915/gt/uc/abi/guc_klvs_abi.h
+++ b/drivers/gpu/drm/i915/gt/uc/abi/guc_klvs_abi.h
@@ -29,8 +29,8 @@
  */
 
 #define GUC_KLV_LEN_MIN				1u
-#define GUC_KLV_0_KEY				(0xffff << 16)
-#define GUC_KLV_0_LEN				(0xffff << 0)
+#define GUC_KLV_0_KEY				GENMASK(31, 16)
+#define GUC_KLV_0_LEN				GENMASK(15, 0)
 #define GUC_KLV_n_VALUE				(0xffffffff << 0)
 
 /**
-- 
2.17.1



More information about the Intel-gfx mailing list