public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: fbtft: force cast to non-__iomem pointer
@ 2015-04-16 17:29 Garret Kelly
  2015-04-30 14:51 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 4+ messages in thread
From: Garret Kelly @ 2015-04-16 17:29 UTC (permalink / raw)
  To: Thomas Petazzoni, Noralf Trønnes, Greg Kroah-Hartman,
	open list:STAGING SUBSYSTEM, open list
  Cc: Garret Kelly

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-05-07  8:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-16 17:29 [PATCH] staging: fbtft: force cast to non-__iomem pointer Garret Kelly
2015-04-30 14:51 ` Greg Kroah-Hartman
2015-05-06 21:34   ` Garret Kelly
2015-05-07  8:39     ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox