linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Timur Tabi <timur@tabi.org>
To: Michal Simek <michal.simek@xilinx.com>
Cc: linux-kernel@vger.kernel.org, Michal Simek <monstr@monstr.eu>,
	Arnd Bergmann <arnd@arndb.de>,
	Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
	Tomi Valkeinen <tomi.valkeinen@ti.com>,
	linux-fbdev@vger.kernel.org
Subject: Re: [PATCH v3 7/8] video: xilinxfb: Fix sparse warnings
Date: Fri, 31 May 2013 13:26:05 +0000	[thread overview]
Message-ID: <51A8A4ED.6070104@tabi.org> (raw)
In-Reply-To: <ea3d6fcbb9f7a00a9cdbd3d0a7a4d3401265ebf0.1370004925.git.michal.simek@xilinx.com>

On 05/31/2013 07:55 AM, Michal Simek wrote:

> diff --git a/drivers/video/xilinxfb.c b/drivers/video/xilinxfb.c
> index f3d4a69..e27a4f6 100644
> --- a/drivers/video/xilinxfb.c
> +++ b/drivers/video/xilinxfb.c
> @@ -131,7 +131,7 @@ struct xilinxfb_drvdata {
>  	dcr_host_t      dcr_host;
>  	unsigned int    dcr_len;
>  #endif
> -	void		*fb_virt;	/* virt. address of the frame buffer */
> +	void __iomem	*fb_virt;	/* virt. address of the frame buffer */
>  	dma_addr_t	fb_phys;	/* phys. address of the frame buffer */
>  	int		fb_alloced;	/* Flag, was the fb memory alloced? */
> 
> @@ -273,8 +273,10 @@ static int xilinxfb_assign(struct platform_device *pdev,
>  		drvdata->fb_virt = ioremap(pdata->fb_phys, fbsize);
>  	} else {
>  		drvdata->fb_alloced = 1;
> -		drvdata->fb_virt = dma_alloc_coherent(dev, PAGE_ALIGN(fbsize),
> -					&drvdata->fb_phys, GFP_KERNEL);
> +		drvdata->fb_virt = (__force void __iomem *)
> +				   dma_alloc_coherent(dev, PAGE_ALIGN(fbsize),
> +						      &drvdata->fb_phys,
> +						      GFP_KERNEL);

I think this is wrong.  At least, it would be on PowerPC.
dma_alloc_coherent() allocates regular RAM, not I/O memory.  So it
should not be __iomem.



-- 
Timur Tabi

  reply	other threads:[~2013-05-31 13:26 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-31 12:55 [PATCH v3 0/8] xilinxfb changes Michal Simek
     [not found] ` <cover.1370004925.git.michal.simek-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
2013-05-31 12:55   ` [PATCH v3 1/8] video: xilinxfb: Fix OF probing on little-endian systems Michal Simek
2013-05-31 13:05     ` Timur Tabi
2013-05-31 13:09       ` Michal Simek
2013-05-31 12:55 ` [PATCH v3 2/8] video: xilinxfb: Do not name out_be32 in function name Michal Simek
2013-05-31 12:55 ` [PATCH v3 3/8] video: xilinxfb: Rename PLB_ACCESS_FLAG to BUS_ACCESS_FLAG Michal Simek
2013-05-31 12:55 ` [PATCH v3 4/8] video: xilinxfb: Use drvdata->regs_phys instead of physaddr Michal Simek
2013-05-31 12:55 ` [PATCH v3 5/8] video: xilinxfb: Group bus initialization Michal Simek
2013-05-31 12:55 ` [PATCH v3 6/8] video: xilinxfb: Add support for little endian accesses Michal Simek
2013-05-31 13:38   ` Arnd Bergmann
2013-05-31 12:55 ` [PATCH v3 7/8] video: xilinxfb: Fix sparse warnings Michal Simek
2013-05-31 13:26   ` Timur Tabi [this message]
2013-05-31 13:37     ` Michal Simek
2013-05-31 13:41       ` Timur Tabi
2013-05-31 14:22         ` Michal Simek
2013-05-31 14:56           ` Arnd Bergmann
2013-05-31 15:06             ` Timur Tabi
2013-05-31 15:29               ` Arnd Bergmann
2013-05-31 16:33                 ` Michal Simek
2013-05-31 15:28           ` Arnd Bergmann
2013-05-31 12:55 ` [PATCH v3 8/8] video: xilinxfb: Use driver for Xilinx ARM Zynq Michal Simek

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=51A8A4ED.6070104@tabi.org \
    --to=timur@tabi.org \
    --cc=arnd@arndb.de \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=monstr@monstr.eu \
    --cc=plagnioj@jcrosoft.com \
    --cc=tomi.valkeinen@ti.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).