aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/bnxt/bnxt.c
diff options
context:
space:
mode:
authorFuqian Huang <huangfq.daxian@gmail.com>2019-07-15 11:19:11 +0800
committerDavid S. Miller <davem@davemloft.net>2019-07-15 11:06:27 -0700
commit3a5ee3b30126bd7dc5d6299f3a985d4fefcf42c9 (patch)
treebc48ce9996493d2db1151e6d200037db8076a69f /drivers/net/ethernet/broadcom/bnxt/bnxt.c
parentatm: idt77252: Remove call to memset after dma_alloc_coherent (diff)
downloadlinux-dev-3a5ee3b30126bd7dc5d6299f3a985d4fefcf42c9.tar.xz
linux-dev-3a5ee3b30126bd7dc5d6299f3a985d4fefcf42c9.zip
ethernet: remove redundant memset
kvzalloc already zeroes the memory during the allocation. 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 the memset after these function is not needed. Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnxt/bnxt.c')
-rw-r--r--drivers/net/ethernet/broadcom/bnxt/bnxt.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 3f632028eff0..1069eb01cc55 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -2677,8 +2677,6 @@ static int bnxt_alloc_tx_rings(struct bnxt *bp)
mapping = txr->tx_push_mapping +
sizeof(struct tx_push_bd);
txr->data_mapping = cpu_to_le64(mapping);
-
- memset(txr->tx_push, 0, sizeof(struct tx_push_bd));
}
qidx = bp->tc_to_qidx[j];
ring->queue_id = bp->q_info[qidx].queue_id;