linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* checkpatch complaint
@ 2012-02-08 20:51 Arend van Spriel
  2012-02-08 23:42 ` Joe Perches
  0 siblings, 1 reply; 5+ messages in thread
From: Arend van Spriel @ 2012-02-08 20:51 UTC (permalink / raw)
  To: Andy Whitcroft; +Cc: Dan Carpenter, Joe Perches, linux-kernel

checkpatch complains on code below and I must overlook something or
checkpatch gives a false negative/positive/whatever:

#define IFPTR(usb, idx)         ((usb)->actconfig->interface[(idx)])
#define IFALTS(usb, idx)        (IFPTR((usb), (idx))->altsetting[0])
#define IFDESC(usb, idx)        IFALTS((usb), (idx)).desc
#define IFEPDESC(usb, idx, ep)  \
	(IFALTS((usb), (idx)).endpoint[(ep)]).desc

checkpatch errors:
ERROR: Macros with complex values should be enclosed in parenthesis
#169: FILE: drivers/net/wireless/brcm80211/brcmfmac/usb.c:58:
+#define IFDESC(usb, idx)        (IFALTS((usb), (idx))).desc

ERROR: Macros with complex values should be enclosed in parenthesis
#170: FILE: drivers/net/wireless/brcm80211/brcmfmac/usb.c:59:
+#define IFEPDESC(usb, idx, ep)  ((IFALTS((usb),
(idx))).endpoint[(ep)]).desc

Any ideas? I tried extra parenthesis around IFALTS but that does not
resolve it.

Gr. AvS


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-02-09 10:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-08 20:51 checkpatch complaint Arend van Spriel
2012-02-08 23:42 ` Joe Perches
2012-02-09  5:05   ` Guenter Roeck
2012-02-09 10:20     ` Bernd Petrovitsch
2012-02-09 10:06   ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).