On Fri, 2013-10-25 at 03:52 +0000, Paul Zimmerman wrote:
> > From: Dan Williams
> > Sent: Thursday, October 24, 2013 12:45 AM
> > 
> > On Thu, Oct 24, 2013 at 12:36 AM, Dan Williams <dan.j.willi...@intel.com> 
> > wrote:
> > > Permit list_for_each redifinitions like:
> > >
> > > #define for_each_connector_peer(peer, port, c) \
> > >        list_for_each_entry(peer, &(c)->ports, node) \
> > >                if (port != peer)
> > >
> > > ...which triggers:
> > > ERROR: Macros with complex values should be enclosed in parenthesis
> 
> Kind of off-topic, but that macro looks a little dangerous. From what I have
> seen in the kernel, it's usually done something like this:
> 
> #define for_each_connector_peer(peer, port, c) \
>       list_for_each_entry(peer, &(c)->ports, node) \
>               if (port == peer) {} else

That seems pretty non-standard.
Look at include/linux/list.h or
$ git grep -E "\{\s*\}\s*else"

Is there any effective difference?


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to