diff options
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/aquantia/atlantic/aq_main.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c | 3 | ||||
-rw-r--r-- | drivers/net/ethernet/realtek/r8169.c | 5 | ||||
-rw-r--r-- | drivers/net/ethernet/ti/davinci_mdio.c | 4 | ||||
-rw-r--r-- | drivers/net/ethernet/xilinx/ll_temac_main.c | 20 | ||||
-rw-r--r-- | drivers/net/ethernet/xilinx/ll_temac_mdio.c | 2 |
6 files changed, 16 insertions, 20 deletions
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_main.c b/drivers/net/ethernet/aquantia/atlantic/aq_main.c index 7f45e9908582..1ea8b77fc1a7 100644 --- a/drivers/net/ethernet/aquantia/atlantic/aq_main.c +++ b/drivers/net/ethernet/aquantia/atlantic/aq_main.c @@ -23,7 +23,7 @@ MODULE_VERSION(AQ_CFG_DRV_VERSION); MODULE_AUTHOR(AQ_CFG_DRV_AUTHOR); MODULE_DESCRIPTION(AQ_CFG_DRV_DESC); -const char aq_ndev_driver_name[] = AQ_CFG_DRV_NAME; +static const char aq_ndev_driver_name[] = AQ_CFG_DRV_NAME; static const struct net_device_ops aq_ndev_ops; diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c index 4989fb13244f..f9623f928915 100644 --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c @@ -1156,11 +1156,8 @@ static int mvpp2_port_flt_rfs_rule_insert(struct mvpp2_port *port, static int mvpp2_cls_c2_build_match(struct mvpp2_rfs_rule *rule) { struct flow_rule *flow = rule->flow; - struct flow_action_entry *act; int offs = 64; - act = &flow->action.entries[0]; - if (flow_rule_match_key(flow, FLOW_DISSECTOR_KEY_PORTS)) { struct flow_match_ports match; diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index 0ce3dcc6db26..290debbe1f48 100644 --- a/drivers/net/ethernet/realtek/r8169.c +++ b/drivers/net/ethernet/realtek/r8169.c @@ -775,9 +775,9 @@ static bool rtl_loop_wait(struct rtl8169_private *tp, const struct rtl_cond *c, int i; for (i = 0; i < n; i++) { - delay(d); if (c->check(tp) == high) return true; + delay(d); } netif_err(tp, drv, tp->dev, "%s == %d (loop: %d, delay: %d).\n", c->msg, !high, n, d); @@ -6451,8 +6451,7 @@ static int r8169_phy_connect(struct rtl8169_private *tp) if (!tp->supports_gmii) phy_set_max_speed(phydev, SPEED_100); - /* Ensure to advertise everything, incl. pause */ - linkmode_copy(phydev->advertising, phydev->supported); + phy_support_asym_pause(phydev); phy_attached_info(phydev); diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/ethernet/ti/davinci_mdio.c index 11642721c123..38b7f6d35759 100644 --- a/drivers/net/ethernet/ti/davinci_mdio.c +++ b/drivers/net/ethernet/ti/davinci_mdio.c @@ -398,8 +398,8 @@ static int davinci_mdio_probe(struct platform_device *pdev) res = platform_get_resource(pdev, IORESOURCE_MEM, 0); data->regs = devm_ioremap(dev, res->start, resource_size(res)); - if (IS_ERR(data->regs)) - return PTR_ERR(data->regs); + if (!data->regs) + return -ENOMEM; davinci_mdio_init_clk(data); diff --git a/drivers/net/ethernet/xilinx/ll_temac_main.c b/drivers/net/ethernet/xilinx/ll_temac_main.c index ca95c726269a..985199100b7d 100644 --- a/drivers/net/ethernet/xilinx/ll_temac_main.c +++ b/drivers/net/ethernet/xilinx/ll_temac_main.c @@ -63,22 +63,22 @@ * Low level register access functions */ -u32 _temac_ior_be(struct temac_local *lp, int offset) +static u32 _temac_ior_be(struct temac_local *lp, int offset) { return ioread32be(lp->regs + offset); } -void _temac_iow_be(struct temac_local *lp, int offset, u32 value) +static void _temac_iow_be(struct temac_local *lp, int offset, u32 value) { return iowrite32be(value, lp->regs + offset); } -u32 _temac_ior_le(struct temac_local *lp, int offset) +static u32 _temac_ior_le(struct temac_local *lp, int offset) { return ioread32(lp->regs + offset); } -void _temac_iow_le(struct temac_local *lp, int offset, u32 value) +static void _temac_iow_le(struct temac_local *lp, int offset, u32 value) { return iowrite32(value, lp->regs + offset); } @@ -645,25 +645,25 @@ static void temac_adjust_link(struct net_device *ndev) #ifdef CONFIG_64BIT -void ptr_to_txbd(void *p, struct cdmac_bd *bd) +static void ptr_to_txbd(void *p, struct cdmac_bd *bd) { bd->app3 = (u32)(((u64)p) >> 32); bd->app4 = (u32)((u64)p & 0xFFFFFFFF); } -void *ptr_from_txbd(struct cdmac_bd *bd) +static void *ptr_from_txbd(struct cdmac_bd *bd) { return (void *)(((u64)(bd->app3) << 32) | bd->app4); } #else -void ptr_to_txbd(void *p, struct cdmac_bd *bd) +static void ptr_to_txbd(void *p, struct cdmac_bd *bd) { bd->app4 = (u32)p; } -void *ptr_from_txbd(struct cdmac_bd *bd) +static void *ptr_from_txbd(struct cdmac_bd *bd) { return (void *)(bd->app4); } @@ -927,9 +927,9 @@ static int temac_open(struct net_device *ndev) } else if (strlen(lp->phy_name) > 0) { phydev = phy_connect(lp->ndev, lp->phy_name, temac_adjust_link, lp->phy_interface); - if (!phydev) { + if (IS_ERR(phydev)) { dev_err(lp->dev, "phy_connect() failed\n"); - return -ENODEV; + return PTR_ERR(phydev); } phy_start(phydev); } diff --git a/drivers/net/ethernet/xilinx/ll_temac_mdio.c b/drivers/net/ethernet/xilinx/ll_temac_mdio.c index c2a11703bc6d..a4667326f745 100644 --- a/drivers/net/ethernet/xilinx/ll_temac_mdio.c +++ b/drivers/net/ethernet/xilinx/ll_temac_mdio.c @@ -99,7 +99,7 @@ int temac_mdio_setup(struct temac_local *lp, struct platform_device *pdev) of_address_to_resource(np, 0, &res); snprintf(bus->id, MII_BUS_ID_SIZE, "%.8llx", (unsigned long long)res.start); - } else if (pdata && pdata->mdio_bus_id >= 0) { + } else if (pdata) { snprintf(bus->id, MII_BUS_ID_SIZE, "%.8llx", pdata->mdio_bus_id); } |