[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFqt6zYkgrUgtFQbc-W=Jap84wshPSH5aTRTBfsRkOQhaSROdQ@mail.gmail.com>
Date: Sun, 20 Jan 2019 18:38:24 +0530
From: Souptick Joarder <jrdr.linux@...il.com>
To: Sabyasachi Gupta <sabyasachi.linux@...il.com>
Cc: Yoshinori Sato <ysato@...rs.sourceforge.jp>, dalias@...c.org,
thomas.petazzoni@...e-electrons.com, robin.murphy@....com,
jacopo+renesas@...ndi.org, linux-sh@...r.kernel.org,
linux-kernel@...r.kernel.org,
Brajeswar Ghosh <brajeswar.linux@...il.com>
Subject: Re: [PATCH] arch/sh/mm/consistent.c: Use dma_zalloc_coherent
On Sun, Oct 28, 2018 at 12:29 PM Sabyasachi Gupta
<sabyasachi.linux@...il.com> wrote:
>
> Replaced dma_alloc_coherent + memset with dma_zalloc_coherant
>
> Signed-off-by: Sabyasachi Gupta <sabyasachi.linux@...il.com>
Acked-by: Souptick Joarder <jrdr.linux@...il.com>
> ---
> arch/sh/mm/consistent.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/sh/mm/consistent.c b/arch/sh/mm/consistent.c
> index 792f361..fc8d235 100644
> --- a/arch/sh/mm/consistent.c
> +++ b/arch/sh/mm/consistent.c
> @@ -52,13 +52,12 @@ int __init platform_resource_setup_memory(struct platform_device *pdev,
> if (!memsize)
> return 0;
>
> - buf = dma_alloc_coherent(&pdev->dev, memsize, &dma_handle, GFP_KERNEL);
> + buf = dma_zalloc_coherent(&pdev->dev, memsize, &dma_handle, GFP_KERNEL);
> if (!buf) {
> pr_warning("%s: unable to allocate memory\n", name);
> return -ENOMEM;
> }
>
> - memset(buf, 0, memsize);
>
> r->flags = IORESOURCE_MEM;
> r->start = dma_handle;
> --
> 2.7.4
>
Powered by blists - more mailing lists