]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/net/ethernet/broadcom/bnx2.c
drivers:net: dma_alloc_coherent: use __GFP_ZERO instead of memset(, 0)
[karo-tx-linux.git] / drivers / net / ethernet / broadcom / bnx2.c
index a1adfaf87f499bc84a77dbc714abf8eba3adb4ef..e709296e3b85dbee34f5acadabe9a0a987cee427 100644 (file)
@@ -854,12 +854,11 @@ bnx2_alloc_mem(struct bnx2 *bp)
                                sizeof(struct statistics_block);
 
        status_blk = dma_alloc_coherent(&bp->pdev->dev, bp->status_stats_size,
-                                       &bp->status_blk_mapping, GFP_KERNEL);
+                                       &bp->status_blk_mapping,
+                                       GFP_KERNEL | __GFP_ZERO);
        if (status_blk == NULL)
                goto alloc_mem_err;
 
-       memset(status_blk, 0, bp->status_stats_size);
-
        bnapi = &bp->bnx2_napi[0];
        bnapi->status_blk.msi = status_blk;
        bnapi->hw_tx_cons_ptr =
@@ -8543,7 +8542,6 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
        pci_set_drvdata(pdev, dev);
 
        memcpy(dev->dev_addr, bp->mac_addr, 6);
-       memcpy(dev->perm_addr, bp->mac_addr, 6);
 
        dev->hw_features = NETIF_F_IP_CSUM | NETIF_F_SG |
                NETIF_F_TSO | NETIF_F_TSO_ECN |