[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <50F96555.2020402@ti.com>
Date: Fri, 18 Jan 2013 17:08:05 +0200
From: Roger Quadros <rogerq@...com>
To: Russell King - ARM Linux <linux@....linux.org.uk>
CC: <sameo@...ux.intel.com>, <balbi@...com>, <tony@...mide.com>,
<kishon@...com>, <sshtylyov@...sta.com>, <bjorn@...k.no>,
<linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v8 06/22] mfd: omap-usb-tll: introduce and use mode_needs_tll()
On 01/18/2013 05:02 PM, Russell King - ARM Linux wrote:
> On Fri, Jan 18, 2013 at 02:17:09PM +0200, Roger Quadros wrote:
>> +/* only PHY and UNUSED modes don't need TLL */
>> +#define omap_usb_mode_needs_tll(x) ((x != OMAP_USBHS_PORT_MODE_UNUSED) &&\
>> + (x != OMAP_EHCI_PORT_MODE_PHY))
>
> Growl.
>
> These parens do not make anything safer at all - they just obfuscate. The
> safe version of the above macro would have been:
>
> #define omap_usb_mode_needs_tll(x) ((x) != OMAP_USBHS_PORT_MODE_UNUSED &&\
> (x) != OMAP_EHCI_PORT_MODE_PHY)
>
> If you're going to use a macro argument in an expression, it needs parens.
> Simple expressions like a != b && c != d do _not_ need parens.
>
Yikes, that was brain dead stuff from me ;). Will fix.
cheers,
-roger
--
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