mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Larry Finger <Larry.Finger@lwfinger.net>
To: Andy Whitcroft <apw@canonical.com>, Joe Perches <joe@perches.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Inconsistency in scripts/checkpatch.pl
Date: Thu, 29 Jun 2017 20:26:59 -0500	[thread overview]
Message-ID: <70ae7b56-7fcd-9677-4768-e8a7343c5d75@lwfinger.net> (raw)

Andy and Joe,

In some new rtlwifi code, I get the following for one of the new macros:

CHECK: Macro argument '__h2c' may be better as '(__h2c)' to avoid precedence issues
#45005: FILE: 
drivers/net/wireless/realtek/rtlwifi/halmac/halmac_original_h2c_nic.h:1163:
+#define AOAC_RSVD_PAGE3_GET_LOC_AOAC_REPORT(__h2c)                     \
+       LE_BITS_TO_4BYTE(__h2c + 0X00, 16, 8)

When I make that change, I get

CHECK: No space is necessary after a cast
#45004: FILE: 
drivers/net/wireless/realtek/rtlwifi/halmac/halmac_original_h2c_nic.h:1162:
+       LE_BITS_TO_4BYTE((__h2c) + 0X00, 16, 8)

Which CHECK should I fix? To my eye, the second form is the false positive.

Larry

             reply	other threads:[~2017-06-30  1:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-30  1:26 Larry Finger [this message]
2017-06-30  3:12 ` Joe Perches

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=70ae7b56-7fcd-9677-4768-e8a7343c5d75@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=apw@canonical.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

all inboxes | Powered by JetHome®