summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFuqian Huang <huangfq.daxian@gmail.com>2019-07-15 11:19:21 +0800
committerDavid S. Miller <davem@davemloft.net>2019-07-15 11:06:27 -0700
commit6a24c8fb0d889b39079215970210f88255b81c80 (patch)
treee996ed7fccd0b23fadcb52f7cde4248069dc4a4f
parent3a5ee3b30126bd7dc5d6299f3a985d4fefcf42c9 (diff)
downloadlinux-stable-6a24c8fb0d889b39079215970210f88255b81c80.tar.gz
linux-stable-6a24c8fb0d889b39079215970210f88255b81c80.tar.bz2
linux-stable-6a24c8fb0d889b39079215970210f88255b81c80.zip
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 <huangfq.daxian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/hippi/rrunner.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/net/hippi/rrunner.c b/drivers/net/hippi/rrunner.c
index 7b9350dbebdd..2a6ec5394966 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);