Thread (6 messages) 6 messages, 2 authors, 2023-06-12
STALE1094d

[PATCH 2/3] fbdev/hitfb: Fix integer-to-pointer cast

From: Thomas Zimmermann <tzimmermann@suse.de>
Date: 2023-06-06 10:41:13
Also in: dri-devel, linux-sh
Subsystem: framebuffer layer, the rest · Maintainers: Helge Deller, Linus Torvalds

Fix the type casting from unsigned long to char __iomem *. Resolves
the following warning:

../drivers/video/fbdev/hitfb.c:411:27: warning: incorrect type in assignment (different address spaces)
../drivers/video/fbdev/hitfb.c:411:27:    expected char [noderef] __iomem *screen_base
../drivers/video/fbdev/hitfb.c:411:27:    got void *

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/video/fbdev/hitfb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/hitfb.c b/drivers/video/fbdev/hitfb.c
index 551b00f761a7..1ee3aa3d3fc7 100644
--- a/drivers/video/fbdev/hitfb.c
+++ b/drivers/video/fbdev/hitfb.c
@@ -408,7 +408,7 @@ static int hitfb_probe(struct platform_device *dev)
 	info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN |
 		FBINFO_HWACCEL_FILLRECT | FBINFO_HWACCEL_COPYAREA;
 
-	info->screen_base = (void *)hitfb_fix.smem_start;
+	info->screen_base = (char __iomem *)(uintptr_t)hitfb_fix.smem_start;
 
 	ret = fb_alloc_cmap(&info->cmap, 256, 0);
 	if (unlikely(ret < 0))
-- 
2.40.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help