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

net: micrel: Remove set but not used variable

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

drivers/net/ethernet/micrel/ksz884x.c: In function rx_proc:
drivers/net/ethernet/micrel/ksz884x.c:4981:6: warning: variable ‘rx_status’ set but not used [-Wunused-but-set-variable]

drivers/net/ethernet/micrel/ksz884x.c: In function netdev_get_ethtool_stats:
drivers/net/ethernet/micrel/ksz884x.c:6512:6: warning: variable ‘rc’ 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 f9d80a09
...@@ -4978,7 +4978,6 @@ static inline int rx_proc(struct net_device *dev, struct ksz_hw* hw, ...@@ -4978,7 +4978,6 @@ static inline int rx_proc(struct net_device *dev, struct ksz_hw* hw,
struct dev_info *hw_priv = priv->adapter; struct dev_info *hw_priv = priv->adapter;
struct ksz_dma_buf *dma_buf; struct ksz_dma_buf *dma_buf;
struct sk_buff *skb; struct sk_buff *skb;
int rx_status;
/* Received length includes 4-byte CRC. */ /* Received length includes 4-byte CRC. */
packet_len = status.rx.frame_len - 4; packet_len = status.rx.frame_len - 4;
...@@ -5014,7 +5013,7 @@ static inline int rx_proc(struct net_device *dev, struct ksz_hw* hw, ...@@ -5014,7 +5013,7 @@ static inline int rx_proc(struct net_device *dev, struct ksz_hw* hw,
dev->stats.rx_bytes += packet_len; dev->stats.rx_bytes += packet_len;
/* Notify upper layer for received packet. */ /* Notify upper layer for received packet. */
rx_status = netif_rx(skb); netif_rx(skb);
return 0; return 0;
} }
...@@ -6507,7 +6506,6 @@ static void netdev_get_ethtool_stats(struct net_device *dev, ...@@ -6507,7 +6506,6 @@ static void netdev_get_ethtool_stats(struct net_device *dev,
int i; int i;
int n; int n;
int p; int p;
int rc;
u64 counter[TOTAL_PORT_COUNTER_NUM]; u64 counter[TOTAL_PORT_COUNTER_NUM];
mutex_lock(&hw_priv->lock); mutex_lock(&hw_priv->lock);
...@@ -6528,19 +6526,19 @@ static void netdev_get_ethtool_stats(struct net_device *dev, ...@@ -6528,19 +6526,19 @@ static void netdev_get_ethtool_stats(struct net_device *dev,
if (1 == port->mib_port_cnt && n < SWITCH_PORT_NUM) { if (1 == port->mib_port_cnt && n < SWITCH_PORT_NUM) {
p = n; p = n;
rc = wait_event_interruptible_timeout( wait_event_interruptible_timeout(
hw_priv->counter[p].counter, hw_priv->counter[p].counter,
2 == hw_priv->counter[p].read, 2 == hw_priv->counter[p].read,
HZ * 1); HZ * 1);
} else } else
for (i = 0, p = n; i < port->mib_port_cnt - n; i++, p++) { for (i = 0, p = n; i < port->mib_port_cnt - n; i++, p++) {
if (0 == i) { if (0 == i) {
rc = wait_event_interruptible_timeout( wait_event_interruptible_timeout(
hw_priv->counter[p].counter, hw_priv->counter[p].counter,
2 == hw_priv->counter[p].read, 2 == hw_priv->counter[p].read,
HZ * 2); HZ * 2);
} else if (hw->port_mib[p].cnt_ptr) { } else if (hw->port_mib[p].cnt_ptr) {
rc = wait_event_interruptible_timeout( wait_event_interruptible_timeout(
hw_priv->counter[p].counter, hw_priv->counter[p].counter,
2 == hw_priv->counter[p].read, 2 == hw_priv->counter[p].read,
HZ * 1); HZ * 1);
......
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