lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 14 May 2009 11:58:37 -0400
From:	"H Hartley Sweeten" <hartleys@...ionengravers.com>
To:	"J. Bruce Fields" <bfields@...ldses.org>
Cc:	<linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] net/sunrpc/svc.c: fix sparse warning

On Monday, May 11, 2009 4:06 PM, J. Bruce Fields wrote:
> On Thu, Apr 16, 2009 at 03:15:17PM -0400, H Hartley Sweeten wrote:
>> On Thursday, April 16, 2009 12:06 PM, J. Bruce Fields wrote:
>>> On Wed, Apr 15, 2009 at 03:46:13PM -0400, H Hartley Sweeten wrote:
>>>> Fix sparse warning in net/sunrpc/svc.c.
>>>> 
>>>> 	warning: symbol 'node' shadows an earlier one
>>>
>>> What's the other symbol?
>>
>> Sorry. Left that out...
>> 
>> include/linux/nodemask.h
>> 
>> #define any_online_node(mask)			\
>> ({						\
>> 	int node;				\
>> 	for_each_node_mask(node, (mask))	\
>> 		if (node_online(node))		\
>> 			break;			\
>> 	node;					\
>> })
>> 
>> arch/powerpc/mm/numa.c is the only other user of that macro. In that
>> file the local variable is called nid, hence the name change in this
>> patch.
>
> Stupid question (and sorry for the delay): any reason that macro
> couldn't just be a static inline function?
>
> I'm sort of resistant to the idea that the caller should have to care
> what local variable names the implementation uses.

That would probably be cleaner and it would prevent the same warning
from possibly occurring in the future.  I just assumed it was originally
made a macro for a good reason.

Should I submit an updated patch changing the macro into an static
inline function?

Thanks,
Hartley
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ