All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] maillbox: bcm-flexrm-mailbox: Use dma_pool_zalloc()
@ 2018-02-17  9:42 Souptick Joarder
  0 siblings, 0 replies; only message in thread
From: Souptick Joarder @ 2018-02-17  9:42 UTC (permalink / raw)
  To: jassisinghbrar; +Cc: linux-kernel

Use dma_pool_zalloc() instead of dma_pool_alloc + memset

Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
---
 drivers/mailbox/bcm-flexrm-mailbox.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/mailbox/bcm-flexrm-mailbox.c b/drivers/mailbox/bcm-flexrm-mailbox.c
index a8cf433..8ab077f 100644
--- a/drivers/mailbox/bcm-flexrm-mailbox.c
+++ b/drivers/mailbox/bcm-flexrm-mailbox.c
@@ -1268,7 +1268,7 @@ static int flexrm_startup(struct mbox_chan *chan)
 	}

 	/* Allocate completion memory */
-	ring->cmpl_base = dma_pool_alloc(ring->mbox->cmpl_pool,
+	ring->cmpl_base = dma_pool_zalloc(ring->mbox->cmpl_pool,
 					 GFP_KERNEL, &ring->cmpl_dma_base);
 	if (!ring->cmpl_base) {
 		dev_err(ring->mbox->dev,
@@ -1277,7 +1277,6 @@ static int flexrm_startup(struct mbox_chan *chan)
 		ret = -ENOMEM;
 		goto fail_free_bd_memory;
 	}
-	memset(ring->cmpl_base, 0, RING_CMPL_SIZE);

 	/* Request IRQ */
 	if (ring->irq == UINT_MAX) {
--
1.9.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-02-17  9:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-17  9:42 [PATCH] maillbox: bcm-flexrm-mailbox: Use dma_pool_zalloc() Souptick Joarder

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.