Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[firefly-linux-kernel-4.4.55.git] / drivers / net / ethernet / amd / au1000_eth.c
index 2ea221ed4777f01527a81d08d299dcf44a3b6b8f..688aede742c7d0068d061f377582253f52280d12 100644 (file)
@@ -437,8 +437,8 @@ static int au1000_mii_probe(struct net_device *dev)
        /* now we are supposed to have a proper phydev, to attach to... */
        BUG_ON(phydev->attached_dev);
 
-       phydev = phy_connect(dev, dev_name(&phydev->dev), &au1000_adjust_link,
-                       0, PHY_INTERFACE_MODE_MII);
+       phydev = phy_connect(dev, dev_name(&phydev->dev),
+                            &au1000_adjust_link, PHY_INTERFACE_MODE_MII);
 
        if (IS_ERR(phydev)) {
                netdev_err(dev, "Could not attach to PHY\n");
@@ -587,10 +587,10 @@ au1000_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
 {
        struct au1000_private *aup = netdev_priv(dev);
 
-       strcpy(info->driver, DRV_NAME);
-       strcpy(info->version, DRV_VERSION);
-       info->fw_version[0] = '\0';
-       sprintf(info->bus_info, "%s %d", DRV_NAME, aup->mac_id);
+       strlcpy(info->driver, DRV_NAME, sizeof(info->driver));
+       strlcpy(info->version, DRV_VERSION, sizeof(info->version));
+       snprintf(info->bus_info, sizeof(info->bus_info), "%s %d", DRV_NAME,
+                aup->mac_id);
        info->regdump_len = 0;
 }
 
@@ -727,7 +727,6 @@ static int au1000_rx(struct net_device *dev)
                        frmlen -= 4; /* Remove FCS */
                        skb = netdev_alloc_skb(dev, frmlen + 2);
                        if (skb == NULL) {
-                               netdev_err(dev, "Memory squeeze, dropping packet.\n");
                                dev->stats.rx_dropped++;
                                continue;
                        }