[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20151001152338.GI7340@mwanda>
Date: Thu, 1 Oct 2015 18:23:38 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Lars Svensson <lars1.svensson@...ymobile.com>
Cc: thomas.petazzoni@...e-electrons.com, noralf@...nnes.org,
devel@...verdev.osuosl.org, gregkh@...uxfoundation.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: fbtft: add typecast in call to vfree()
On Thu, Oct 01, 2015 at 03:00:12PM +0200, Lars Svensson wrote:
> Member screen_base in struct fb_info is declared __iomem causing
> a sparse warning as below when passed to vfree(). This adds typecast
> (__force void *) to silence the warning.
>
> fbtft-core.c:922:39: warning: incorrect type in argument 1 \
> (different address spaces)
> fbtft-core.c:922:39: expected void const *addr
> fbtft-core.c:922:39: got char [noderef] <asn:2>*screen_base
>
I thought we were going to do something like this:
diff --git a/include/linux/fb.h b/include/linux/fb.h
index be40dba..3324c92 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -483,7 +483,10 @@ struct fb_info {
#ifdef CONFIG_FB_TILEBLITTING
struct fb_tile_ops *tileops; /* Tile Blitting */
#endif
- char __iomem *screen_base; /* Virtual address */
+ union {
+ char __iomem *screen_base; /* Virtual address */
+ char *fake_screen_base;
+ };
unsigned long screen_size; /* Amount of ioremapped VRAM or 0 */
void *pseudo_palette; /* Fake palette of 16 colors */
#define FBINFO_STATE_RUNNING 0
The only question is what to call the fake_screen_base.
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists