[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51A8A4ED.6070104@tabi.org>
Date: Fri, 31 May 2013 08:26:05 -0500
From: Timur Tabi <timur@...i.org>
To: Michal Simek <michal.simek@...inx.com>
CC: linux-kernel@...r.kernel.org, Michal Simek <monstr@...str.eu>,
Arnd Bergmann <arnd@...db.de>,
Jean-Christophe Plagniol-Villard <plagnioj@...osoft.com>,
Tomi Valkeinen <tomi.valkeinen@...com>,
linux-fbdev@...r.kernel.org
Subject: Re: [PATCH v3 7/8] video: xilinxfb: Fix sparse warnings
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists