lkml.org 
[lkml]   [2015]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] staging: fbtft: force cast to non-__iomem pointer
Date
fbtft uses fb_info's screen_base field to store a non-__iomem
allocation. Cast away the __iomem qualifier when freeing the pointer to
suppress the sparse warning.

Fixes the following sparse warnings:
drivers/staging/fbtft/fbtft-core.c:918:19: warning: incorrect type in argument 1 (different address spaces)
drivers/staging/fbtft/fbtft-core.c:918:19: expected void const *addr
drivers/staging/fbtft/fbtft-core.c:918:19: got char [noderef] <asn:2>*screen_base

Signed-off-by: Garret Kelly <gdk@google.com>
---
drivers/staging/fbtft/fbtft-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
index 37dcf7e..1196dda 100644
--- a/drivers/staging/fbtft/fbtft-core.c
+++ b/drivers/staging/fbtft/fbtft-core.c
@@ -925,7 +925,7 @@ EXPORT_SYMBOL(fbtft_framebuffer_alloc);
void fbtft_framebuffer_release(struct fb_info *info)
{
fb_deferred_io_cleanup(info);
- vfree(info->screen_base);
+ vfree((void __force *)info->screen_base);
framebuffer_release(info);
}
EXPORT_SYMBOL(fbtft_framebuffer_release);
--
2.0.2


\
 
 \ /
  Last update: 2015-04-16 19:41    [W:0.119 / U:2.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site