[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b0ab5c79-89d2-3045-cbe6-5d2afc4fefdc@suse.de>
Date: Fri, 20 Nov 2020 10:21:24 +0100
From: Thomas Zimmermann <tzimmermann@...e.de>
To: Xu Wang <vulab@...as.ac.cn>, b.zolnierkie@...sung.com,
daniel.vetter@...ll.ch, jani.nikula@...el.com,
dri-devel@...ts.freedesktop.org, linux-fbdev@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] video: goldfishfb: remove casting dma_alloc_coherent
Hi
Am 20.11.20 um 09:23 schrieb Xu Wang:
> Remove casting the values returned by dma_alloc_coherent.
>
> Signed-off-by: Xu Wang <vulab@...as.ac.cn>
> ---
> drivers/video/fbdev/goldfishfb.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/video/fbdev/goldfishfb.c b/drivers/video/fbdev/goldfishfb.c
> index 9c83ec3f8e1f..c2f386b35617 100644
> --- a/drivers/video/fbdev/goldfishfb.c
> +++ b/drivers/video/fbdev/goldfishfb.c
> @@ -238,8 +238,7 @@ static int goldfish_fb_probe(struct platform_device *pdev)
> fb->fb.var.blue.length = 5;
>
> framesize = width * height * 2 * 2;
> - fb->fb.screen_base = (char __force __iomem *)dma_alloc_coherent(
> - &pdev->dev, framesize,
> + fb->fb.screen_base = dma_alloc_coherent(&pdev->dev, framesize,
> &fbpaddr, GFP_KERNEL);
But dma_alloc_coherent() returns void*. I wonder if this change wouldn't
result in a warning from the compiler.
Best regards
Thomas
> pr_debug("allocating frame buffer %d * %d, got %p\n",
> width, height, fb->fb.screen_base);
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer
Download attachment "OpenPGP_0x680DC11D530B7A23.asc" of type "application/pgp-keys" (7436 bytes)
Download attachment "OpenPGP_signature" of type "application/pgp-signature" (841 bytes)
Powered by blists - more mailing lists