public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Aseda Aboagye <aaboagye@google.com>
Cc: apw@canonical.com, linux-kernel@vger.kernel.org
Subject: Re: False positive in checkpatch.pl ?
Date: Fri, 05 Jun 2015 10:43:29 -0700	[thread overview]
Message-ID: <1433526209.2658.75.camel@perches.com> (raw)
In-Reply-To: <CAJnPg5JS_evQaKVGiSHs-yZ+Gfh_-w3APqa3Lin7-pXM7xeRbw@mail.gmail.com>

On Fri, 2015-06-05 at 10:21 -0700, Aseda Aboagye wrote:
> Hello CHECKPATCH maintainers,
> 
> I encountered this error when using the checkpatch.pl script
> complaining about my macro.
> 
>         Errors:
>             * checkpatch.pl errors/warnings
> 
>             ERROR: Macros with complex values should be enclosed in parenthesis
>             #92: FILE: include/libsharedobjs.h:28:
>             +#define SHAREDLIB(...) __attribute__
> ((section(".roshared"))) __VA_ARGS__
> 
>             total: 1 errors, 0 warnings, 45 lines checked
> 
> Since it's really an attribute, adding the parens wouldn't work. Just
> thought I'd send this your way. Perhaps make an exception for cases
> like these?

SHAREDLIB is not used in the kernel tree.
Maybe add an exception in your own checkpatch version.

Though maybe adding a SHAREDLIB macro without the ... and
make it a simple #define instead like below would be better

#define SHAREDLIB	__attribute__((section(".roshared")))



      reply	other threads:[~2015-06-05 17:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-05 17:21 False positive in checkpatch.pl ? Aseda Aboagye
2015-06-05 17:43 ` Joe Perches [this message]

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=1433526209.2658.75.camel@perches.com \
    --to=joe@perches.com \
    --cc=aaboagye@google.com \
    --cc=apw@canonical.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