From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Joe Perches <joe@perches.com>, linux-kernel@vger.kernel.org
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
linux-fbdev@vger.kernel.org
Subject: Re: [PATCH -next 25/26] fbdev: Use dma_zalloc_coherent
Date: Mon, 23 Jun 2014 11:53:45 +0000 [thread overview]
Message-ID: <53A81549.40206@ti.com> (raw)
In-Reply-To: <881b8f8d85c96b6e9d8735aa10bbf18468688b9d.1402863905.git.joe@perches.com>
[-- Attachment #1: Type: text/plain, Size: 1317 bytes --]
On 15/06/14 23:37, Joe Perches wrote:
> Use the zeroing function instead of dma_alloc_coherent & memset(,0,)
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> drivers/video/fbdev/da8xx-fb.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/video/fbdev/da8xx-fb.c b/drivers/video/fbdev/da8xx-fb.c
> index a8484f7..788f6b3 100644
> --- a/drivers/video/fbdev/da8xx-fb.c
> +++ b/drivers/video/fbdev/da8xx-fb.c
> @@ -1447,18 +1447,15 @@ static int fb_probe(struct platform_device *device)
> da8xx_fb_fix.line_length - 1;
>
> /* allocate palette buffer */
> - par->v_palette_base = dma_alloc_coherent(NULL,
> - PALETTE_SIZE,
> - (resource_size_t *)
> - &par->p_palette_base,
> - GFP_KERNEL | GFP_DMA);
> + par->v_palette_base = dma_zalloc_coherent(NULL, PALETTE_SIZE,
> + (resource_size_t *)&par->p_palette_base,
> + GFP_KERNEL | GFP_DMA);
> if (!par->v_palette_base) {
> dev_err(&device->dev,
> "GLCD: kmalloc for palette buffer failed\n");
> ret = -EINVAL;
> goto err_release_fb_mem;
> }
> - memset(par->v_palette_base, 0, PALETTE_SIZE);
>
> par->irq = platform_get_irq(device, 0);
> if (par->irq < 0) {
>
Thanks, queued for 3.17.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2014-06-23 11:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-15 20:37 [PATCH -next 00/26] treewide: Use dma_zalloc_coherent Joe Perches
2014-06-15 20:37 ` [PATCH -next 25/26] fbdev: " Joe Perches
2014-06-15 22:16 ` Geert Uytterhoeven
2014-06-15 23:32 ` Joe Perches
2014-06-23 11:53 ` Tomi Valkeinen [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=53A81549.40206@ti.com \
--to=tomi.valkeinen@ti.com \
--cc=joe@perches.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=plagnioj@jcrosoft.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).