Commit f313edfe authored by Zheng Yongjun's avatar Zheng Yongjun Committed by David S. Miller

net: cortina: Remove set but not used variable

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/net/ethernet/cortina/gemini.c: In function gmac_get_ringparam:
drivers/net/ethernet/cortina/gemini.c:2125:21: warning: variable ‘config0’ set but not used [-Wunused-but-set-variable]

drivers/net/ethernet/cortina/gemini.c: In function gmac_init:
drivers/net/ethernet/cortina/gemini.c:512:6: warning: variable ‘val’ set but not used [-Wunused-but-set-variable]

these variable is never used, so remove it.
Signed-off-by: default avatarZheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a9609d79
...@@ -509,7 +509,6 @@ static int gmac_init(struct net_device *netdev) ...@@ -509,7 +509,6 @@ static int gmac_init(struct net_device *netdev)
.rel_threshold = 0, .rel_threshold = 0,
} }; } };
union gmac_config0 tmp; union gmac_config0 tmp;
u32 val;
config0.bits.max_len = gmac_pick_rx_max_len(netdev->mtu); config0.bits.max_len = gmac_pick_rx_max_len(netdev->mtu);
tmp.bits32 = readl(port->gmac_base + GMAC_CONFIG0); tmp.bits32 = readl(port->gmac_base + GMAC_CONFIG0);
...@@ -519,7 +518,7 @@ static int gmac_init(struct net_device *netdev) ...@@ -519,7 +518,7 @@ static int gmac_init(struct net_device *netdev)
writel(config2.bits32, port->gmac_base + GMAC_CONFIG2); writel(config2.bits32, port->gmac_base + GMAC_CONFIG2);
writel(config3.bits32, port->gmac_base + GMAC_CONFIG3); writel(config3.bits32, port->gmac_base + GMAC_CONFIG3);
val = readl(port->dma_base + GMAC_AHB_WEIGHT_REG); readl(port->dma_base + GMAC_AHB_WEIGHT_REG);
writel(ahb_weight.bits32, port->dma_base + GMAC_AHB_WEIGHT_REG); writel(ahb_weight.bits32, port->dma_base + GMAC_AHB_WEIGHT_REG);
writel(hw_weigh.bits32, writel(hw_weigh.bits32,
...@@ -2107,9 +2106,8 @@ static void gmac_get_ringparam(struct net_device *netdev, ...@@ -2107,9 +2106,8 @@ static void gmac_get_ringparam(struct net_device *netdev,
struct ethtool_ringparam *rp) struct ethtool_ringparam *rp)
{ {
struct gemini_ethernet_port *port = netdev_priv(netdev); struct gemini_ethernet_port *port = netdev_priv(netdev);
union gmac_config0 config0;
config0.bits32 = readl(port->gmac_base + GMAC_CONFIG0); readl(port->gmac_base + GMAC_CONFIG0);
rp->rx_max_pending = 1 << 15; rp->rx_max_pending = 1 << 15;
rp->rx_mini_max_pending = 0; rp->rx_mini_max_pending = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment