Commit 6a24c8fb authored by Fuqian Huang's avatar Fuqian Huang Committed by David S. Miller
Browse files

hippi: Remove call to memset after pci_alloc_consistent



pci_alloc_consistent calls dma_alloc_coherent directly.
In commit 518a2f19
("dma-mapping: zero memory returned from dma_alloc_*"),
dma_alloc_coherent has already zeroed the memory.
So memset is not needed.

Signed-off-by: default avatarFuqian Huang <huangfq.daxian@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3a5ee3b3
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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);