diff options
author | Hannes Eder <hannes@hanneseder.net> | 2009-02-14 11:16:04 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-17 17:26:09 -0800 |
commit | 97915b5bf6454416c7b27444fc95c08132b74251 (patch) | |
tree | 35aaedbbee99918d241b2474ab02c16f454f7ca8 | |
parent | 54b87323eddd9b7854249f05cfd183a0ac602ab6 (diff) | |
download | linux-97915b5bf6454416c7b27444fc95c08132b74251.tar.bz2 |
drivers/net/cxgb3: fix sparse warning: symbol shadows an earlier one
Impact: Move variable declaration as close to usage as possible.
Fix this sparse warning:
drivers/net/cxgb3/cxgb3_main.c:1586:21: warning: symbol 'cap' shadows an earlier one
Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Acked-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/cxgb3/cxgb3_main.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c index f2c7cc3e263a..0f6062aaa2c6 100644 --- a/drivers/net/cxgb3/cxgb3_main.c +++ b/drivers/net/cxgb3/cxgb3_main.c @@ -1565,7 +1565,6 @@ static int speed_duplex_to_caps(int speed, int duplex) static int set_settings(struct net_device *dev, struct ethtool_cmd *cmd) { - int cap; struct port_info *p = netdev_priv(dev); struct link_config *lc = &p->link_config; @@ -1575,7 +1574,7 @@ static int set_settings(struct net_device *dev, struct ethtool_cmd *cmd) * being requested. */ if (cmd->autoneg == AUTONEG_DISABLE) { - cap = speed_duplex_to_caps(cmd->speed, cmd->duplex); + int cap = speed_duplex_to_caps(cmd->speed, cmd->duplex); if (lc->supported & cap) return 0; } |