lkml.org 
[lkml]   [2018]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] arch/powerpc: Use dma_zalloc_coherent
On Mon, Nov 5, 2018 at 7:52 AM Sabyasachi Gupta
<sabyasachi.linux@gmail.com> wrote:
>
> Replaced dma_alloc_coherent + memset with dma_zalloc_coherent
>
> Signed-off-by: Sabyasachi Gupta <sabyasachi.linux@gmail.com>

Any comment on this patch?

> ---
> 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
>

\
 
 \ /
  Last update: 2018-11-15 18:57    [W:0.079 / U:0.904 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site