summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorHannes Eder <hannes@hanneseder.net>2009-02-14 11:15:49 +0000
committerDavid S. Miller <davem@davemloft.net>2009-02-17 17:26:08 -0800
commit54b87323eddd9b7854249f05cfd183a0ac602ab6 (patch)
treeb05c2eaa0a8d4ebfc95367b198ff69f210a5286e /drivers/net
parent1f78d9f94539b8806b81057e75025f2bac7d7ccc (diff)
downloadkernel-crypto-54b87323eddd9b7854249f05cfd183a0ac602ab6.tar.gz
kernel-crypto-54b87323eddd9b7854249f05cfd183a0ac602ab6.tar.xz
kernel-crypto-54b87323eddd9b7854249f05cfd183a0ac602ab6.zip
drivers/net/bonding: fix sparse warning: symbol shadows an earlier one
Impact: Rename function scope variable. Fix this sparse warning: drivers/net/bonding/bond_main.c:4704:13: warning: symbol 'mode' shadows an earlier one drivers/net/bonding/bond_main.c:95:13: originally declared here Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/bonding/bond_main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index d7695d43158..2c96b93b12a 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -4732,7 +4732,7 @@ static void bond_free_all(void)
*/
int bond_parse_parm(const char *buf, const struct bond_parm_tbl *tbl)
{
- int mode = -1, i, rv;
+ int modeint = -1, i, rv;
char *p, modestr[BOND_MAX_MODENAME_LEN + 1] = { 0, };
for (p = (char *)buf; *p; p++)
@@ -4742,13 +4742,13 @@ int bond_parse_parm(const char *buf, const struct bond_parm_tbl *tbl)
if (*p)
rv = sscanf(buf, "%20s", modestr);
else
- rv = sscanf(buf, "%d", &mode);
+ rv = sscanf(buf, "%d", &modeint);
if (!rv)
return -1;
for (i = 0; tbl[i].modename; i++) {
- if (mode == tbl[i].mode)
+ if (modeint == tbl[i].mode)
return tbl[i].mode;
if (strcmp(modestr, tbl[i].modename) == 0)
return tbl[i].mode;