From: Robin Murphy <Robin.Murphy@arm.com>
To: Sabyasachi Gupta <sabyasachi.linux@gmail.com>,
"ysato@users.sourceforge.jp" <ysato@users.sourceforge.jp>,
"dalias@libc.org" <dalias@libc.org>,
"thomas.petazzoni@free-electrons.com"
<thomas.petazzoni@free-electrons.com>,
"jacopo+renesas@jmondi.org" <jacopo+renesas@jmondi.org>
Cc: "jrdr.linux@gmail.com" <jrdr.linux@gmail.com>,
"linux-sh@vger.kernel.org" <linux-sh@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"brajeswar.linux@gmail.com" <brajeswar.linux@gmail.com>
Subject: Re: [PATCH] arch/sh/mm/consistent.c: Use dma_zalloc_coherent
Date: Mon, 21 Jan 2019 11:43:51 +0000 [thread overview]
Message-ID: <fcbf537f-6e95-0e25-710a-02a3a6e7961a@arm.com> (raw)
In-Reply-To: <5bd55e34.1c69fb81.b2503.b6f5@mx.google.com>
On 28/10/2018 06:58, Sabyasachi Gupta wrote:
> Replaced dma_alloc_coherent + memset with dma_zalloc_coherant
Please take a look at linux-next where we've already phased out
dma_zalloc_coherent(). The memset() should still be redundant and worth
cleaning up, though.
Thanks,
Robin.
> Signed-off-by: Sabyasachi Gupta <sabyasachi.linux@gmail.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;
>
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
prev parent reply other threads:[~2019-01-21 11:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-28 6:58 Sabyasachi Gupta
2019-01-20 13:08 ` Souptick Joarder
2019-01-21 11:43 ` Robin Murphy [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=fcbf537f-6e95-0e25-710a-02a3a6e7961a@arm.com \
--to=robin.murphy@arm.com \
--cc=brajeswar.linux@gmail.com \
--cc=dalias@libc.org \
--cc=jacopo+renesas@jmondi.org \
--cc=jrdr.linux@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=sabyasachi.linux@gmail.com \
--cc=thomas.petazzoni@free-electrons.com \
--cc=ysato@users.sourceforge.jp \
/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
Powered by JetHome