From: Sabyasachi Gupta <sabyasachi.linux@gmail.com>
To: ysato@users.sourceforge.jp, dalias@libc.org,
thomas.petazzoni@free-electrons.com, robin.murphy@arm.com,
jacopo+renesas@jmondi.org
Cc: jrdr.linux@gmail.com, linux-sh@vger.kernel.org,
linux-kernel@vger.kernel.org, brajeswar.linux@gmail.com
Subject: [PATCH] arch/sh/mm/consistent.c: Use dma_zalloc_coherent
Date: Sun, 28 Oct 2018 12:28:56 +0530 [thread overview]
Message-ID: <5bd55e34.1c69fb81.b2503.b6f5@mx.google.com> (raw)
Replaced dma_alloc_coherent + memset with dma_zalloc_coherant
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;
--
2.7.4
next reply other threads:[~2018-10-28 6:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-28 6:58 Sabyasachi Gupta [this message]
2019-01-20 13:08 ` [PATCH] arch/sh/mm/consistent.c: Use dma_zalloc_coherent Souptick Joarder
2019-01-21 11:43 ` Robin Murphy
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=5bd55e34.1c69fb81.b2503.b6f5@mx.google.com \
--to=sabyasachi.linux@gmail.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=robin.murphy@arm.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;
as well as URLs for NNTP newsgroup(s).