From: Dan Carpenter <dan.carpenter@oracle.com>
To: Lars Svensson <lars1.svensson@sonymobile.com>
Cc: thomas.petazzoni@free-electrons.com, noralf@tronnes.org,
devel@driverdev.osuosl.org, gregkh@linuxfoundation.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: fbtft: add typecast in call to vfree()
Date: Thu, 1 Oct 2015 18:23:38 +0300 [thread overview]
Message-ID: <20151001152338.GI7340@mwanda> (raw)
In-Reply-To: <1443704412-11795-1-git-send-email-lars1.svensson@sonymobile.com>
On Thu, Oct 01, 2015 at 03:00:12PM +0200, Lars Svensson wrote:
> 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
>
I thought we were going to do something like this:
diff --git a/include/linux/fb.h b/include/linux/fb.h
index be40dba..3324c92 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -483,7 +483,10 @@ struct fb_info {
#ifdef CONFIG_FB_TILEBLITTING
struct fb_tile_ops *tileops; /* Tile Blitting */
#endif
- char __iomem *screen_base; /* Virtual address */
+ union {
+ char __iomem *screen_base; /* Virtual address */
+ char *fake_screen_base;
+ };
unsigned long screen_size; /* Amount of ioremapped VRAM or 0 */
void *pseudo_palette; /* Fake palette of 16 colors */
#define FBINFO_STATE_RUNNING 0
The only question is what to call the fake_screen_base.
regards,
dan carpenter
prev parent reply other threads:[~2015-10-01 15:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-01 13:00 [PATCH] staging: fbtft: add typecast in call to vfree() Lars Svensson
2015-10-01 15:23 ` Dan Carpenter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151001152338.GI7340@mwanda \
--to=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=lars1.svensson@sonymobile.com \
--cc=linux-kernel@vger.kernel.org \
--cc=noralf@tronnes.org \
--cc=thomas.petazzoni@free-electrons.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.