From: Souptick Joarder Date: Sat, 17 Feb 2018 09:41:13 +0000 (+0530) Subject: maillbox: bcm-flexrm-mailbox: Use dma_pool_zalloc() X-Git-Tag: v5.15~9093^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6de84023d31bc40931d0a789b75964db8728e553;p=platform%2Fkernel%2Flinux-starfive.git maillbox: bcm-flexrm-mailbox: Use dma_pool_zalloc() Use dma_pool_zalloc() instead of dma_pool_alloc + memset Signed-off-by: Souptick Joarder Signed-off-by: Jassi Brar --- 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) {