public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Sabyasachi Gupta <sabyasachi.linux@gmail•com>
To: benh@kernel•crashing.org, paulus@samba•org, mpe@ellerman•id.au,
	joe@perches•com, darren@stevens-zone•net,
	christophe.leroy@c-s•fr, geoff@infradead•org
Cc: linuxppc-dev@lists•ozlabs.org, jrdr.linux@gmail•com,
	linux-kernel@vger•kernel.org
Subject: [PATCH] arch/powerpc: Use dma_zalloc_coherent
Date: Mon, 5 Nov 2018 08:58:23 +0530	[thread overview]
Message-ID: <5bdfb8db.1c69fb81.c8f62.9586@mx.google.com> (raw)

Replaced dma_alloc_coherent + memset with dma_zalloc_coherent

Signed-off-by: Sabyasachi Gupta <sabyasachi.linux@gmail•com>
---
 arch/powerpc/platforms/pasemi/dma_lib.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/powerpc/platforms/pasemi/dma_lib.c b/arch/powerpc/platforms/pasemi/dma_lib.c
index 53384eb..d18d164 100644
--- a/arch/powerpc/platforms/pasemi/dma_lib.c
+++ b/arch/powerpc/platforms/pasemi/dma_lib.c
@@ -255,15 +255,13 @@ int pasemi_dma_alloc_ring(struct pasemi_dmachan *chan, int ring_size)
 
 	chan->ring_size = ring_size;
 
-	chan->ring_virt = dma_alloc_coherent(&dma_pdev->dev,
+	chan->ring_virt = dma_zalloc_coherent(&dma_pdev->dev,
 					     ring_size * sizeof(u64),
 					     &chan->ring_dma, GFP_KERNEL);
 
 	if (!chan->ring_virt)
 		return -ENOMEM;
 
-	memset(chan->ring_virt, 0, ring_size * sizeof(u64));
-
 	return 0;
 }
 EXPORT_SYMBOL(pasemi_dma_alloc_ring);
-- 
2.7.4


             reply	other threads:[~2018-11-05  5:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-05  3:28 Sabyasachi Gupta [this message]
2018-11-15 17:59 ` [PATCH] arch/powerpc: Use dma_zalloc_coherent Sabyasachi Gupta
2018-11-15 19:25   ` Joe Perches
2018-11-17  7:10     ` Souptick Joarder
2018-11-17  8:24       ` Joe Perches
2018-11-16 10:06   ` Michael Ellerman
2018-11-27  9:22 ` Michael Ellerman
  -- strict thread matches above, loose matches on Subject: below --
2018-11-05  2:22 [PATCH] " Sabyasachi Gupta
2018-11-15 17:56 ` Sabyasachi Gupta
2018-12-22  1:56   ` Scott Wood
2018-12-05  4:41 ` Sabyasachi Gupta

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=5bdfb8db.1c69fb81.c8f62.9586@mx.google.com \
    --to=sabyasachi.linux@gmail$(echo .)com \
    --cc=benh@kernel$(echo .)crashing.org \
    --cc=christophe.leroy@c-s$(echo .)fr \
    --cc=darren@stevens-zone$(echo .)net \
    --cc=geoff@infradead$(echo .)org \
    --cc=joe@perches$(echo .)com \
    --cc=jrdr.linux@gmail$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=mpe@ellerman$(echo .)id.au \
    --cc=paulus@samba$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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