lkml.org 
[lkml]   [2015]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2015-10-01 17:41    [W:0.018 / U:2.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site