public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: fbtft: add typecast in call to vfree()
@ 2015-10-01 13:00 Lars Svensson
  2015-10-01 15:23 ` Dan Carpenter
  0 siblings, 1 reply; 2+ messages in thread
From: Lars Svensson @ 2015-10-01 13:00 UTC (permalink / raw)
  To: thomas.petazzoni, noralf; +Cc: gregkh, devel, linux-kernel, Lars Svensson

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

Signed-off-by: Lars Svensson <lars1.svensson@sonymobile.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 7f5fa3d..3e91fb5 100644
--- a/drivers/staging/fbtft/fbtft-core.c
+++ b/drivers/staging/fbtft/fbtft-core.c
@@ -919,7 +919,7 @@ EXPORT_SYMBOL(fbtft_framebuffer_alloc);
 void fbtft_framebuffer_release(struct fb_info *info)
 {
 	fb_deferred_io_cleanup(info);
-	vfree(info->screen_base);
+	vfree((__force void *)info->screen_base);
 	framebuffer_release(info);
 }
 EXPORT_SYMBOL(fbtft_framebuffer_release);
-- 
2.4.2


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

end of thread, other threads:[~2015-10-01 15:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-01 13:00 [PATCH] staging: fbtft: add typecast in call to vfree() Lars Svensson
2015-10-01 15:23 ` Dan Carpenter

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