Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1237411

[PATCH] staging: fbtft: add typecast in call to vfree()

From Lars Svensson <lars1.svensson@sonymobile.com>
Newsgroups linux.kernel
Subject [PATCH] staging: fbtft: add typecast in call to vfree()
Date 2015-10-01 15:10 +0200
Message-ID <qeLMu-53B-11@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] staging: fbtft: add typecast in call to vfree() Lars Svensson <lars1.svensson@sonymobile.com> - 2015-10-01 15:10 +0200
  Re: [PATCH] staging: fbtft: add typecast in call to vfree() Dan Carpenter <dan.carpenter@oracle.com> - 2015-10-01 17:30 +0200

csiph-web