Thread (21 messages) flat view 21 messages, 4 authors, 2013-05-31

Re: [PATCH v3 7/8] video: xilinxfb: Fix sparse warnings

From: Arnd Bergmann <arnd@arndb.de>
Date: 2013-05-31 14:59:25
Also in: lkml

On Friday 31 May 2013 16:22:24 Michal Simek wrote:
quoted hunk ↗ jump to hunk
@@ -307,7 +319,11 @@ static int xilinxfb_assign(struct platform_device *pdev,

        /* Fill struct fb_info */
        drvdata->info.device = dev;
-       drvdata->info.screen_base = (void __iomem *)drvdata->fb_virt;
+       if (drvdata->fb_virt)
+               drvdata->info.screen_base = (__force void __iomem *)
+                                                       drvdata->fb_virt;
+       else
+               drvdata->info.screen_base = drvdata->fb_virt_io;
Yes, unfortunately, this is what all other frame buffer drivers do
at the moment. It is technically not correct, but most architectures
are able to call readl/writel on regular memory, or dereference
__iomem tokens, so we often get away with it. It's probably not
worth fixing it in the fbdev code base as that would be a huge
change, and people are migrating to DRM/KMS.

	Arnd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help