linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sabyasachi Gupta <sabyasachi.linux@gmail.com>
To: benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au
Cc: jrdr.linux@gmail.com, linuxppc-dev@lists.ozlabs.org,
	linux-kernel@vger.kernel.org, brajeswar.linux@gmail.com
Subject: [PATCH] arch/powerpc: Use dma_zalloc_coherent
Date: Mon, 5 Nov 2018 07:52:48 +0530	[thread overview]
Message-ID: <5bdfa97d.1c69fb81.4aef7.c9f7@mx.google.com> (raw)

Replaced dma_alloc_coherent + memset with dma_zalloc_coherent

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

diff --git a/arch/powerpc/sysdev/fsl_rmu.c b/arch/powerpc/sysdev/fsl_rmu.c
index 88b35a3d..8b0ebf3 100644
--- a/arch/powerpc/sysdev/fsl_rmu.c
+++ b/arch/powerpc/sysdev/fsl_rmu.c
@@ -756,15 +756,13 @@ fsl_open_outb_mbox(struct rio_mport *mport, void *dev_id, int mbox, int entries)
 	}
 
 	/* Initialize outbound message descriptor ring */
-	rmu->msg_tx_ring.virt = dma_alloc_coherent(priv->dev,
+	rmu->msg_tx_ring.virt = dma_zalloc_coherent(priv->dev,
 				rmu->msg_tx_ring.size * RIO_MSG_DESC_SIZE,
 				&rmu->msg_tx_ring.phys, GFP_KERNEL);
 	if (!rmu->msg_tx_ring.virt) {
 		rc = -ENOMEM;
 		goto out_dma;
 	}
-	memset(rmu->msg_tx_ring.virt, 0,
-			rmu->msg_tx_ring.size * RIO_MSG_DESC_SIZE);
 	rmu->msg_tx_ring.tx_slot = 0;
 
 	/* Point dequeue/enqueue pointers at first entry in ring */
-- 
2.7.4


             reply	other threads:[~2018-11-05  2:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-05  2:22 Sabyasachi Gupta [this message]
2018-11-15 17:56 ` [PATCH] arch/powerpc: Use dma_zalloc_coherent Sabyasachi Gupta
2018-12-22  1:56   ` Scott Wood
2018-12-05  4:41 ` Sabyasachi Gupta
2018-11-05  3:28 Sabyasachi Gupta
2018-11-15 17:59 ` 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

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=5bdfa97d.1c69fb81.4aef7.c9f7@mx.google.com \
    --to=sabyasachi.linux@gmail.com \
    --cc=benh@kernel.crashing.org \
    --cc=brajeswar.linux@gmail.com \
    --cc=jrdr.linux@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    /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).