drivers/net/vmxnet3: Use kzalloc
[safe/jmp/linux-2.6] / drivers / net / vmxnet3 / vmxnet3_drv.c
index ee1b397..989b742 100644 (file)
@@ -992,7 +992,6 @@ vmxnet3_tq_xmit(struct sk_buff *skb, struct vmxnet3_tx_queue *tq,
                VMXNET3_WRITE_BAR0_REG(adapter, VMXNET3_REG_TXPROD,
                                       tq->tx_ring.next2fill);
        }
-       netdev->trans_start = jiffies;
 
        return NETDEV_TX_OK;
 
@@ -1174,7 +1173,6 @@ vmxnet3_rq_rx_complete(struct vmxnet3_rx_queue *rq,
                                netif_receive_skb(skb);
                        }
 
-                       adapter->netdev->last_rx = jiffies;
                        ctx->skb = NULL;
                }
 
@@ -1371,13 +1369,12 @@ vmxnet3_rq_create(struct vmxnet3_rx_queue *rq, struct vmxnet3_adapter *adapter)
 
        sz = sizeof(struct vmxnet3_rx_buf_info) * (rq->rx_ring[0].size +
                                                   rq->rx_ring[1].size);
-       bi = kmalloc(sz, GFP_KERNEL);
+       bi = kzalloc(sz, GFP_KERNEL);
        if (!bi) {
                printk(KERN_ERR "%s: failed to allocate rx bufinfo\n",
                       adapter->netdev->name);
                goto err;
        }
-       memset(bi, 0, sz);
        rq->buf_info[0] = bi;
        rq->buf_info[1] = bi + rq->rx_ring[0].size;
 
@@ -1675,15 +1672,12 @@ vmxnet3_copy_mc(struct net_device *netdev)
                /* We may be called with BH disabled */
                buf = kmalloc(sz, GFP_ATOMIC);
                if (buf) {
-                       int i;
-                       struct dev_mc_list *mc = netdev->mc_list;
+                       struct netdev_hw_addr *ha;
+                       int i = 0;
 
-                       for (i = 0; i < netdev_mc_count(netdev); i++) {
-                               BUG_ON(!mc);
-                               memcpy(buf + i * ETH_ALEN, mc->dmi_addr,
+                       netdev_for_each_mc_addr(ha, netdev)
+                               memcpy(buf + i++ * ETH_ALEN, ha->addr,
                                       ETH_ALEN);
-                               mc = mc->next;
-                       }
                }
        }
        return buf;