Skip to content

Commit 7811ead

Browse files
Sabyasachi GuptaScott Wood
authored andcommitted
arch/powerpc/fsl_rmu: Use dma_zalloc_coherent
Replaced dma_alloc_coherent + memset with dma_zalloc_coherent Signed-off-by: Sabyasachi Gupta <sabyasachi.linux@gmail.com> Signed-off-by: Scott Wood <oss@buserror.net>
1 parent 8c6c942 commit 7811ead

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

arch/powerpc/sysdev/fsl_rmu.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -756,15 +756,13 @@ fsl_open_outb_mbox(struct rio_mport *mport, void *dev_id, int mbox, int entries)
756756
}
757757

758758
/* Initialize outbound message descriptor ring */
759-
rmu->msg_tx_ring.virt = dma_alloc_coherent(priv->dev,
759+
rmu->msg_tx_ring.virt = dma_zalloc_coherent(priv->dev,
760760
rmu->msg_tx_ring.size * RIO_MSG_DESC_SIZE,
761761
&rmu->msg_tx_ring.phys, GFP_KERNEL);
762762
if (!rmu->msg_tx_ring.virt) {
763763
rc = -ENOMEM;
764764
goto out_dma;
765765
}
766-
memset(rmu->msg_tx_ring.virt, 0,
767-
rmu->msg_tx_ring.size * RIO_MSG_DESC_SIZE);
768766
rmu->msg_tx_ring.tx_slot = 0;
769767

770768
/* Point dequeue/enqueue pointers at first entry in ring */

0 commit comments

Comments
 (0)