From: Thomas Zimmermann <tzimmermann@suse.de>
To: Xu Wang <vulab@iscas.ac.cn>,
b.zolnierkie@samsung.com, daniel.vetter@ffwll.ch,
jani.nikula@intel.com, dri-devel@lists.freedesktop.org,
linux-fbdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] video: goldfishfb: remove casting dma_alloc_coherent
Date: Fri, 20 Nov 2020 10:21:24 +0100 [thread overview]
Message-ID: <b0ab5c79-89d2-3045-cbe6-5d2afc4fefdc@suse.de> (raw)
In-Reply-To: <20201120082344.8623-1-vulab@iscas.ac.cn>
[-- 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 --]
prev parent reply other threads:[~2020-11-20 9:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-20 8:23 [PATCH] video: goldfishfb: remove casting dma_alloc_coherent Xu Wang
2020-11-20 9:21 ` Thomas Zimmermann [this message]
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=b0ab5c79-89d2-3045-cbe6-5d2afc4fefdc@suse.de \
--to=tzimmermann@suse.de \
--cc=b.zolnierkie@samsung.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vulab@iscas.ac.cn \
/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).