* [PATCH] video: goldfishfb: remove casting dma_alloc_coherent
@ 2020-11-20 8:23 Xu Wang
2020-11-20 9:21 ` Thomas Zimmermann
0 siblings, 1 reply; 2+ messages in thread
From: Xu Wang @ 2020-11-20 8:23 UTC (permalink / raw)
To: b.zolnierkie, daniel.vetter, jani.nikula, dri-devel, linux-fbdev
Cc: linux-kernel
Remove casting the values returned by dma_alloc_coherent.
Signed-off-by: Xu Wang <vulab@iscas.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);
pr_debug("allocating frame buffer %d * %d, got %p\n",
width, height, fb->fb.screen_base);
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] video: goldfishfb: remove casting dma_alloc_coherent
2020-11-20 8:23 [PATCH] video: goldfishfb: remove casting dma_alloc_coherent Xu Wang
@ 2020-11-20 9:21 ` Thomas Zimmermann
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Zimmermann @ 2020-11-20 9:21 UTC (permalink / raw)
To: Xu Wang, b.zolnierkie, daniel.vetter, jani.nikula, dri-devel,
linux-fbdev
Cc: linux-kernel
[-- Attachment #1.1.1: Type: text/plain, Size: 1296 bytes --]
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@iscas.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
[-- Attachment #1.1.2: OpenPGP_0x680DC11D530B7A23.asc --]
[-- Type: application/pgp-keys, Size: 7535 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-20 9:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-20 8:23 [PATCH] video: goldfishfb: remove casting dma_alloc_coherent Xu Wang
2020-11-20 9:21 ` Thomas Zimmermann
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).