* [PATCH] drm/r128: fix compilation errors caused by `-fsanitize=shift`
@ 2022-05-17 21:24 GONG, Ruiqi
0 siblings, 0 replies; only message in thread
From: GONG, Ruiqi @ 2022-05-17 21:24 UTC (permalink / raw)
To: David Airlie, Daniel Vetter
Cc: Xiu Jianfeng, Wang Weiyang, linux-kernel, dri-devel, gongruiqi1
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@huawei.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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-05-18 7:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-17 21:24 [PATCH] drm/r128: fix compilation errors caused by `-fsanitize=shift` GONG, Ruiqi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).