[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <BD79186B4FD85F4B8E60E381CAEE190902089F54@mi8nycmail19.Mi8.com>
Date: Fri, 15 Jan 2010 11:57:41 -0500
From: "H Hartley Sweeten" <hartleys@...ionengravers.com>
To: "David Miller" <davem@...emloft.net>
Cc: <linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org>,
<kuznet@....inr.ac.ru>, <pekkas@...core.fi>, <jmorris@...ei.org>,
<yoshfuji@...ux-ipv6.org>, <kaber@...sh.net>
Subject: RE: [PATCH] net/ipv4/fib_semantics.c: quiet sparse "shadows" noise
On Friday, January 15, 2010 2:18 AM, David Miller wrote:
> From: H Hartley Sweeten <hartleys@...ionengravers.com>
> Date: Thu, 14 Jan 2010 16:52:41 -0700
>
>> net/ipv4/fib_semantics.c: quiet sparse "shadows" noise
>>
>> If CONFIG_IP_ROUTE_MULTIPATH is defined the symbol 'nh' is
>> declared twice in the function fib_sync_down_dev. First as the
>> loop variable used to iterate the hlist. Then again due to the
>> change_nexthops macro. This produces a sparse warning and
>> makes the code harder to understand.
>>
>> Fix the issue by renaming the first symbol.
>>
>> Signed-off-by: H Hartley Sweeten <hsweeten@...ionengravers.com>
>
> I think it's easier to fix this by using a less simple name
> in change_nexthops(), so I'll deal with this using the following
> patch.
OK. The patch is larger but it's much clearer this way.
> Thanks for reporting this:
>
> ipv4: Use less conflicting local var name in change_nexthops() loop macro.
>
> As noticed by H Hartley Sweeten, since change_nexthops() uses 'nh'
> as it's iterator variable, it can conflict with other existing
> local vars.
>
> Use "nexthop_nh" to avoid the conflict and make it easier to figure
> out where this magic variable comes from.
>
> Signed-off-by: David S. Miller <davem@...emloft.net>
Tested-by: H Hartley Sweeten <hsweeten@...ionengravers.com>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists