All of lore.kernel.org
 help / color / mirror / Atom feed
From: Garret Kelly <gdk@google.com>
To: "Thomas Petazzoni" <thomas.petazzoni@free-electrons.com>,
	"Noralf Trønnes" <noralf@tronnes.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	devel@driverdev.osuosl.org (open list:STAGING SUBSYSTEM),
	linux-kernel@vger.kernel.org (open list)
Cc: Garret Kelly <gdk@google.com>
Subject: [PATCH] staging: fbtft: force cast to non-__iomem pointer
Date: Thu, 16 Apr 2015 13:29:19 -0400	[thread overview]
Message-ID: <1429205359-12929-1-git-send-email-gdk@google.com> (raw)

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


             reply	other threads:[~2015-04-16 17:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-16 17:29 Garret Kelly [this message]
2015-04-30 14:51 ` [PATCH] staging: fbtft: force cast to non-__iomem pointer Greg Kroah-Hartman
2015-05-06 21:34   ` Garret Kelly
2015-05-07  8:39     ` Dan Carpenter

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=1429205359-12929-1-git-send-email-gdk@google.com \
    --to=gdk@google.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --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.