]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
drivers/net/sfc: fix sparse warning: symbol shadows an earlier one
authorHannes Eder <hannes@hanneseder.net>
Sat, 14 Feb 2009 11:41:03 +0000 (11:41 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Feb 2009 01:37:59 +0000 (17:37 -0800)
Impact: Move variable declaration as close to their usage as possible.

Fix this sparse warning:
  drivers/net/sfc/tenxpress.c:589:22: warning: symbol 'link_ok' shadows an earlier one
  drivers/net/sfc/tenxpress.c:575:30: originally declared here

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Acked-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/sfc/tenxpress.c

index ac9eeab79f202a051dd1000a44ba7d7404d93b20..5b0f45166628161e6a225b39137d336e50266d93 100644 (file)
@@ -572,15 +572,14 @@ static void tenxpress_phy_reconfigure(struct efx_nic *efx)
 static void tenxpress_phy_poll(struct efx_nic *efx)
 {
        struct tenxpress_phy_data *phy_data = efx->phy_data;
-       bool change = false, link_ok;
-       unsigned link_fc;
+       bool change = false;
 
        if (efx->phy_type == PHY_TYPE_SFX7101) {
-               link_ok = sfx7101_link_ok(efx);
+               bool link_ok = sfx7101_link_ok(efx);
                if (link_ok != efx->link_up) {
                        change = true;
                } else {
-                       link_fc = mdio_clause45_get_pause(efx);
+                       unsigned int link_fc = mdio_clause45_get_pause(efx);
                        if (link_fc != efx->link_fc)
                                change = true;
                }