Loading drivers/net/bnx2.c +2 −7 Original line number Diff line number Diff line Loading @@ -766,13 +766,10 @@ bnx2_alloc_rx_mem(struct bnx2 *bp) int j; rxr->rx_buf_ring = vmalloc(SW_RXBD_RING_SIZE * bp->rx_max_ring); vzalloc(SW_RXBD_RING_SIZE * bp->rx_max_ring); if (rxr->rx_buf_ring == NULL) return -ENOMEM; memset(rxr->rx_buf_ring, 0, SW_RXBD_RING_SIZE * bp->rx_max_ring); for (j = 0; j < bp->rx_max_ring; j++) { rxr->rx_desc_ring[j] = dma_alloc_coherent(&bp->pdev->dev, Loading @@ -785,13 +782,11 @@ bnx2_alloc_rx_mem(struct bnx2 *bp) } if (bp->rx_pg_ring_size) { rxr->rx_pg_ring = vmalloc(SW_RXPG_RING_SIZE * rxr->rx_pg_ring = vzalloc(SW_RXPG_RING_SIZE * bp->rx_max_pg_ring); if (rxr->rx_pg_ring == NULL) return -ENOMEM; memset(rxr->rx_pg_ring, 0, SW_RXPG_RING_SIZE * bp->rx_max_pg_ring); } for (j = 0; j < bp->rx_max_pg_ring; j++) { Loading drivers/net/cxgb3/cxgb3_offload.c +2 −4 Original line number Diff line number Diff line Loading @@ -1164,12 +1164,10 @@ static void cxgb_redirect(struct dst_entry *old, struct dst_entry *new) */ void *cxgb_alloc_mem(unsigned long size) { void *p = kmalloc(size, GFP_KERNEL); void *p = kzalloc(size, GFP_KERNEL); if (!p) p = vmalloc(size); if (p) memset(p, 0, size); p = vzalloc(size); return p; } Loading drivers/net/cxgb4/cxgb4_main.c +2 −4 Original line number Diff line number Diff line Loading @@ -868,12 +868,10 @@ out: release_firmware(fw); */ void *t4_alloc_mem(size_t size) { void *p = kmalloc(size, GFP_KERNEL); void *p = kzalloc(size, GFP_KERNEL); if (!p) p = vmalloc(size); if (p) memset(p, 0, size); p = vzalloc(size); return p; } Loading drivers/net/e1000/e1000_main.c +2 −4 Original line number Diff line number Diff line Loading @@ -1425,13 +1425,12 @@ static int e1000_setup_tx_resources(struct e1000_adapter *adapter, int size; size = sizeof(struct e1000_buffer) * txdr->count; txdr->buffer_info = vmalloc(size); txdr->buffer_info = vzalloc(size); if (!txdr->buffer_info) { e_err(probe, "Unable to allocate memory for the Tx descriptor " "ring\n"); return -ENOMEM; } memset(txdr->buffer_info, 0, size); /* round up to nearest 4K */ Loading Loading @@ -1621,13 +1620,12 @@ static int e1000_setup_rx_resources(struct e1000_adapter *adapter, int size, desc_len; size = sizeof(struct e1000_buffer) * rxdr->count; rxdr->buffer_info = vmalloc(size); rxdr->buffer_info = vzalloc(size); if (!rxdr->buffer_info) { e_err(probe, "Unable to allocate memory for the Rx descriptor " "ring\n"); return -ENOMEM; } memset(rxdr->buffer_info, 0, size); desc_len = sizeof(struct e1000_rx_desc); Loading drivers/net/e1000e/netdev.c +2 −4 Original line number Diff line number Diff line Loading @@ -2059,10 +2059,9 @@ int e1000e_setup_tx_resources(struct e1000_adapter *adapter) int err = -ENOMEM, size; size = sizeof(struct e1000_buffer) * tx_ring->count; tx_ring->buffer_info = vmalloc(size); tx_ring->buffer_info = vzalloc(size); if (!tx_ring->buffer_info) goto err; memset(tx_ring->buffer_info, 0, size); /* round up to nearest 4K */ tx_ring->size = tx_ring->count * sizeof(struct e1000_tx_desc); Loading Loading @@ -2095,10 +2094,9 @@ int e1000e_setup_rx_resources(struct e1000_adapter *adapter) int i, size, desc_len, err = -ENOMEM; size = sizeof(struct e1000_buffer) * rx_ring->count; rx_ring->buffer_info = vmalloc(size); rx_ring->buffer_info = vzalloc(size); if (!rx_ring->buffer_info) goto err; memset(rx_ring->buffer_info, 0, size); for (i = 0; i < rx_ring->count; i++) { buffer_info = &rx_ring->buffer_info[i]; Loading Loading
drivers/net/bnx2.c +2 −7 Original line number Diff line number Diff line Loading @@ -766,13 +766,10 @@ bnx2_alloc_rx_mem(struct bnx2 *bp) int j; rxr->rx_buf_ring = vmalloc(SW_RXBD_RING_SIZE * bp->rx_max_ring); vzalloc(SW_RXBD_RING_SIZE * bp->rx_max_ring); if (rxr->rx_buf_ring == NULL) return -ENOMEM; memset(rxr->rx_buf_ring, 0, SW_RXBD_RING_SIZE * bp->rx_max_ring); for (j = 0; j < bp->rx_max_ring; j++) { rxr->rx_desc_ring[j] = dma_alloc_coherent(&bp->pdev->dev, Loading @@ -785,13 +782,11 @@ bnx2_alloc_rx_mem(struct bnx2 *bp) } if (bp->rx_pg_ring_size) { rxr->rx_pg_ring = vmalloc(SW_RXPG_RING_SIZE * rxr->rx_pg_ring = vzalloc(SW_RXPG_RING_SIZE * bp->rx_max_pg_ring); if (rxr->rx_pg_ring == NULL) return -ENOMEM; memset(rxr->rx_pg_ring, 0, SW_RXPG_RING_SIZE * bp->rx_max_pg_ring); } for (j = 0; j < bp->rx_max_pg_ring; j++) { Loading
drivers/net/cxgb3/cxgb3_offload.c +2 −4 Original line number Diff line number Diff line Loading @@ -1164,12 +1164,10 @@ static void cxgb_redirect(struct dst_entry *old, struct dst_entry *new) */ void *cxgb_alloc_mem(unsigned long size) { void *p = kmalloc(size, GFP_KERNEL); void *p = kzalloc(size, GFP_KERNEL); if (!p) p = vmalloc(size); if (p) memset(p, 0, size); p = vzalloc(size); return p; } Loading
drivers/net/cxgb4/cxgb4_main.c +2 −4 Original line number Diff line number Diff line Loading @@ -868,12 +868,10 @@ out: release_firmware(fw); */ void *t4_alloc_mem(size_t size) { void *p = kmalloc(size, GFP_KERNEL); void *p = kzalloc(size, GFP_KERNEL); if (!p) p = vmalloc(size); if (p) memset(p, 0, size); p = vzalloc(size); return p; } Loading
drivers/net/e1000/e1000_main.c +2 −4 Original line number Diff line number Diff line Loading @@ -1425,13 +1425,12 @@ static int e1000_setup_tx_resources(struct e1000_adapter *adapter, int size; size = sizeof(struct e1000_buffer) * txdr->count; txdr->buffer_info = vmalloc(size); txdr->buffer_info = vzalloc(size); if (!txdr->buffer_info) { e_err(probe, "Unable to allocate memory for the Tx descriptor " "ring\n"); return -ENOMEM; } memset(txdr->buffer_info, 0, size); /* round up to nearest 4K */ Loading Loading @@ -1621,13 +1620,12 @@ static int e1000_setup_rx_resources(struct e1000_adapter *adapter, int size, desc_len; size = sizeof(struct e1000_buffer) * rxdr->count; rxdr->buffer_info = vmalloc(size); rxdr->buffer_info = vzalloc(size); if (!rxdr->buffer_info) { e_err(probe, "Unable to allocate memory for the Rx descriptor " "ring\n"); return -ENOMEM; } memset(rxdr->buffer_info, 0, size); desc_len = sizeof(struct e1000_rx_desc); Loading
drivers/net/e1000e/netdev.c +2 −4 Original line number Diff line number Diff line Loading @@ -2059,10 +2059,9 @@ int e1000e_setup_tx_resources(struct e1000_adapter *adapter) int err = -ENOMEM, size; size = sizeof(struct e1000_buffer) * tx_ring->count; tx_ring->buffer_info = vmalloc(size); tx_ring->buffer_info = vzalloc(size); if (!tx_ring->buffer_info) goto err; memset(tx_ring->buffer_info, 0, size); /* round up to nearest 4K */ tx_ring->size = tx_ring->count * sizeof(struct e1000_tx_desc); Loading Loading @@ -2095,10 +2094,9 @@ int e1000e_setup_rx_resources(struct e1000_adapter *adapter) int i, size, desc_len, err = -ENOMEM; size = sizeof(struct e1000_buffer) * rx_ring->count; rx_ring->buffer_info = vmalloc(size); rx_ring->buffer_info = vzalloc(size); if (!rx_ring->buffer_info) goto err; memset(rx_ring->buffer_info, 0, size); for (i = 0; i < rx_ring->count; i++) { buffer_info = &rx_ring->buffer_info[i]; Loading