Hm, you're right. Normally, it's an __iomem * but this time it's nothttp://lxr.free-electrons.com/source/include/linux/fb.h#L486diff --git a/drivers/staging/fbtft/fb_agm1264k-fl.c b/drivers/staging/fbtft/fb_agm1264k-fl.cI haven't looked. What is the type for ->screen_base and why can't it
index 9cc7d25..9114239 100644
--- a/drivers/staging/fbtft/fb_agm1264k-fl.c
+++ b/drivers/staging/fbtft/fb_agm1264k-fl.c
@@ -273,7 +273,7 @@ construct_line_bitmap(struct fbtft_par *par, u8 *dest, signed short *src,
static int write_vmem(struct fbtft_par *par, size_t offset, size_t len)
{
- u16 *vmem16 = (u16 *)par->info->screen_base;
+ u16 __iomem *vmem16 = (u16 __iomem *)par->info->screen_base;
be declared as __iomem type?
screen_base is component of struct fb_info, defined as "char __iomem *".
In drivers/staging/fbtft/fbtft-core.c, it looks to be actually set to
a pointer resulting from vzalloc().
an __iomem pointer. Adding anotations to mark it as __iomem is wrong
and adding calls to ioread16() is buggy.
There are a couple ways to make these warnings go away. The simplest
is just to silence the warning with __force:
u16 *vmem16 = (u16 __force *)par->info->screen_base;
I'm not terribly familiar with this code. I don't know that this is the
cleanest approach. We could also just leave the code alone for now and
ignore the warning.