Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net into net
[platform/adaptation/renesas_rcar/renesas_kernel.git] / drivers / net / ethernet / stmicro / stmmac / stmmac_main.c
index 601dd84..39c6c55 100644 (file)
@@ -428,8 +428,7 @@ static int stmmac_init_phy(struct net_device *dev)
                 priv->plat->phy_addr);
        pr_debug("stmmac_init_phy:  trying to attach to %s\n", phy_id_fmt);
 
-       phydev = phy_connect(dev, phy_id_fmt, &stmmac_adjust_link, 0,
-                            interface);
+       phydev = phy_connect(dev, phy_id_fmt, &stmmac_adjust_link, interface);
 
        if (IS_ERR(phydev)) {
                pr_err("%s: Could not attach to PHY\n", dev->name);
@@ -531,17 +530,18 @@ static void init_dma_desc_rings(struct net_device *dev)
        DBG(probe, INFO, "stmmac: txsize %d, rxsize %d, bfsize %d\n",
            txsize, rxsize, bfsize);
 
-       priv->rx_skbuff_dma = kmalloc(rxsize * sizeof(dma_addr_t), GFP_KERNEL);
-       priv->rx_skbuff =
-           kmalloc(sizeof(struct sk_buff *) * rxsize, GFP_KERNEL);
+       priv->rx_skbuff_dma = kmalloc_array(rxsize, sizeof(dma_addr_t),
+                                           GFP_KERNEL);
+       priv->rx_skbuff = kmalloc_array(rxsize, sizeof(struct sk_buff *),
+                                       GFP_KERNEL);
        priv->dma_rx =
            (struct dma_desc *)dma_alloc_coherent(priv->device,
                                                  rxsize *
                                                  sizeof(struct dma_desc),
                                                  &priv->dma_rx_phy,
                                                  GFP_KERNEL);
-       priv->tx_skbuff = kmalloc(sizeof(struct sk_buff *) * txsize,
-                                      GFP_KERNEL);
+       priv->tx_skbuff = kmalloc_array(txsize, sizeof(struct sk_buff *),
+                                       GFP_KERNEL);
        priv->dma_tx =
            (struct dma_desc *)dma_alloc_coherent(priv->device,
                                                  txsize *