OSDN Git Service

fbdev: hitfb: Fix integer-to-pointer cast
authorThomas Zimmermann <tzimmermann@suse.de>
Tue, 6 Jun 2023 10:40:55 +0000 (12:40 +0200)
committerHelge Deller <deller@gmx.de>
Mon, 19 Jun 2023 07:02:51 +0000 (09:02 +0200)
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>
Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Helge Deller <deller@gmx.de>
drivers/video/fbdev/hitfb.c

index 9176699..ee7bf3c 100644 (file)
@@ -392,7 +392,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))