public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Arend van Spriel" <arend@broadcom.com>
To: "Andy Whitcroft" <apw@canonical.com>
Cc: "Dan Carpenter" <dan.carpenter@oracle.com>,
	"Joe Perches" <joe@perches.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: checkpatch complaint
Date: Wed, 8 Feb 2012 21:51:46 +0100	[thread overview]
Message-ID: <4F32E062.1020709@broadcom.com> (raw)

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


             reply	other threads:[~2012-02-08 20:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-08 20:51 Arend van Spriel [this message]
2012-02-08 23:42 ` checkpatch complaint Joe Perches
2012-02-09  5:05   ` Guenter Roeck
2012-02-09 10:20     ` Bernd Petrovitsch
2012-02-09 10:06   ` Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F32E062.1020709@broadcom.com \
    --to=arend@broadcom.com \
    --cc=apw@canonical.com \
    --cc=dan.carpenter@oracle.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox