lkml.org 
[lkml]   [2016]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: checkpatch false positon on EXPORT_SYMBOL
From
Date
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

\
 
 \ /
  Last update: 2016-04-12 20:21    [W:0.067 / U:0.612 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site