From: Fuqian Huang Date: Mon, 15 Jul 2019 03:19:21 +0000 (+0800) Subject: hippi: Remove call to memset after pci_alloc_consistent X-Git-Tag: v5.4-rc1~508^2~34 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6a24c8fb0d889b39079215970210f88255b81c80;p=platform%2Fkernel%2Flinux-rpi.git hippi: Remove call to memset after pci_alloc_consistent pci_alloc_consistent calls dma_alloc_coherent directly. In commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang Signed-off-by: David S. Miller --- diff --git a/drivers/net/hippi/rrunner.c b/drivers/net/hippi/rrunner.c index 7b9350d..2a6ec53 100644 --- a/drivers/net/hippi/rrunner.c +++ b/drivers/net/hippi/rrunner.c @@ -1196,7 +1196,6 @@ static int rr_open(struct net_device *dev) goto error; } rrpriv->rx_ctrl_dma = dma_addr; - memset(rrpriv->rx_ctrl, 0, 256*sizeof(struct ring_ctrl)); rrpriv->info = pci_alloc_consistent(pdev, sizeof(struct rr_info), &dma_addr); @@ -1205,7 +1204,6 @@ static int rr_open(struct net_device *dev) goto error; } rrpriv->info_dma = dma_addr; - memset(rrpriv->info, 0, sizeof(struct rr_info)); wmb(); spin_lock_irqsave(&rrpriv->lock, flags);