aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/niu.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-11-25 19:48:12 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-25 19:48:12 -0500
commit51e0f058c496ef2ca5362c16a53ce1ce454d0817 (patch)
tree4ac330dabb9bd1557902a042c86db2d6a1122cb7 /drivers/net/niu.c
parent2e6a684b8489b21324f314be2bd8d3788a9f6445 (diff)
niu: fix warnings in drivers/net/niu.c
these warnings: drivers/net/niu.c: In function ‘serdes_init_niu_1g_serdes’: drivers/net/niu.c:451: warning: ‘sig’ may be used uninitialized in this function drivers/net/niu.c: In function ‘serdes_init_niu_10g_serdes’: drivers/net/niu.c:550: warning: ‘sig’ may be used uninitialized in this function triggers because GCC does not recognize that the max_retry loop always initializes 'sig', due to max_retry != 0. Annotate them. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/niu.c')
-rw-r--r--drivers/net/niu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/niu.c b/drivers/net/niu.c
index f368e7472133..5b7b31d25be3 100644
--- a/drivers/net/niu.c
+++ b/drivers/net/niu.c
@@ -448,7 +448,7 @@ static int serdes_init_niu_1g_serdes(struct niu *np)
448 struct niu_link_config *lp = &np->link_config; 448 struct niu_link_config *lp = &np->link_config;
449 u16 pll_cfg, pll_sts; 449 u16 pll_cfg, pll_sts;
450 int max_retry = 100; 450 int max_retry = 100;
451 u64 sig, mask, val; 451 u64 uninitialized_var(sig), mask, val;
452 u32 tx_cfg, rx_cfg; 452 u32 tx_cfg, rx_cfg;
453 unsigned long i; 453 unsigned long i;
454 int err; 454 int err;
@@ -547,7 +547,7 @@ static int serdes_init_niu_10g_serdes(struct niu *np)
547 struct niu_link_config *lp = &np->link_config; 547 struct niu_link_config *lp = &np->link_config;
548 u32 tx_cfg, rx_cfg, pll_cfg, pll_sts; 548 u32 tx_cfg, rx_cfg, pll_cfg, pll_sts;
549 int max_retry = 100; 549 int max_retry = 100;
550 u64 sig, mask, val; 550 u64 uninitialized_var(sig), mask, val;
551 unsigned long i; 551 unsigned long i;
552 int err; 552 int err;
553 553