[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20220517212432.107555-1-gongruiqi1@huawei.com>
Date: Tue, 17 May 2022 21:24:32 +0000
From: "GONG, Ruiqi" <gongruiqi1@...wei.com>
To: David Airlie <airlied@...ux.ie>, Daniel Vetter <daniel@...ll.ch>
CC: <dri-devel@...ts.freedesktop.org>, <linux-kernel@...r.kernel.org>,
"Wang Weiyang" <wangweiyang2@...wei.com>,
Xiu Jianfeng <xiujianfeng@...wei.com>, <gongruiqi1@...wei.com>
Subject: [PATCH] drm/r128: fix compilation errors caused by `-fsanitize=shift`
Fix the following compilation errors that are produced by building
recent mainline code on arm64 with `allmodconfig`:
drivers/gpu/drm/r128/r128_cce.c:417:2: error: case label does not reduce to an integer constant
case R128_PM4_64BM_64VCBM_64INDBM:
^~~~
drivers/gpu/drm/r128/r128_cce.c:418:2: error: case label does not reduce to an integer constant
case R128_PM4_64PIO_64VCPIO_64INDPIO:
^~~~
These errors are induced by `-fsanitize=shift`.
Signed-off-by: GONG, Ruiqi <gongruiqi1@...wei.com>
---
drivers/gpu/drm/r128/r128_drv.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/r128/r128_drv.h b/drivers/gpu/drm/r128/r128_drv.h
index 2e1bc01aa5c9..991c27a2b328 100644
--- a/drivers/gpu/drm/r128/r128_drv.h
+++ b/drivers/gpu/drm/r128/r128_drv.h
@@ -300,8 +300,8 @@ extern long r128_compat_ioctl(struct file *filp, unsigned int cmd,
# define R128_PM4_64PIO_128INDBM (5 << 28)
# define R128_PM4_64BM_128INDBM (6 << 28)
# define R128_PM4_64PIO_64VCBM_64INDBM (7 << 28)
-# define R128_PM4_64BM_64VCBM_64INDBM (8 << 28)
-# define R128_PM4_64PIO_64VCPIO_64INDPIO (15 << 28)
+# define R128_PM4_64BM_64VCBM_64INDBM (8u << 28)
+# define R128_PM4_64PIO_64VCPIO_64INDPIO (15u << 28)
# define R128_PM4_BUFFER_CNTL_NOUPDATE (1 << 27)
#define R128_PM4_BUFFER_WM_CNTL 0x0708
--
2.17.1
Powered by blists - more mailing lists