From: Daniel Walker <danielwa@cisco.com>
To: Joe Perches <joe@perches.com>, Andy Whitcroft <apw@canonical.com>
Cc: open list <linux-kernel@vger.kernel.org>,
Daniel Walker <dwalker@fifo99.com>,
"xe-kernel@external.cisco.com" <xe-kernel@external.cisco.com>
Subject: Re: checkpatch false positon on EXPORT_SYMBOL
Date: Tue, 12 Apr 2016 11:02:56 -0700 [thread overview]
Message-ID: <570D3850.4030405@cisco.com> (raw)
In-Reply-To: <1460483357.2507.24.camel@perches.com>
On 04/12/2016 10:49 AM, Joe Perches wrote:
>> On Tue, 2016-04-12 at 13:59 +0100, Andy Whitcroft wrote:
>> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> []
>> @@ -3000,7 +3000,7 @@ sub process {
>>
>> $realline_next = $line_nr_next;
>> if (defined $realline_next &&
>> (!defined $lines[$realline_next - 1] ||
>> - substr($lines[$realline_next - 1], $off_next) =~ /^\s*$/)) {
>> + substr($lines[$realline_next - 1], $off_next) =~ /^($;|\s)*$/)) {
>> $realline_next++;
>> }
> This doesn't work with c99 comments like:
>
> int foo; // comment
> EXPORT_SYMBOL(foo); // comment
>
> but then again, there aren't any uses like that in the
> kernel tree so it almost certainly doesn't matter.
>
> Thanks Andy.
checkpatch.pl is used prior to sending code to a mailing list. So if
someone adds code with C99 comments then they would get false warnings.
Daniel
next prev parent reply other threads:[~2016-04-12 18:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-31 15:01 checkpatch false positon on EXPORT_SYMBOL Daniel Walker
2016-03-31 19:21 ` Joe Perches
2016-04-11 21:51 ` Daniel Walker
2016-04-11 22:09 ` Joe Perches
2016-04-12 12:59 ` Andy Whitcroft
2016-04-12 13:37 ` Daniel Walker
2016-04-12 17:49 ` Joe Perches
2016-04-12 18:02 ` Daniel Walker [this message]
2016-04-13 6:53 ` Andy Whitcroft
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=570D3850.4030405@cisco.com \
--to=danielwa@cisco.com \
--cc=apw@canonical.com \
--cc=dwalker@fifo99.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=xe-kernel@external.cisco.com \
/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