lkml.org 
[lkml]   [2014]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: checkpatch.pl false positive
Date
On Tuesday, July 22, 2014 12:23 PM, Joe Perches wrote:
> On Tue, 2014-07-22 at 17:30 +0000, Hartley Sweeten wrote:
>> Joe,
>>
>> I think this is a false positive, at least the check message appears
>> incorrect:
>>
>> CHECK: No space is necessary after a cast
>> #66: FILE: arch/arm/mach-ep93xx/include/mach/platform.h:66:
>> +static inline int crunch_init(void) { return 0; }
>
> Yeah, it's a false positive introduced by -next
> commit 89da401f6cff ("checkpatch: improve "no space after cast" test")
>
> Try this?
> ---
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 2258497..644c2d5 100755
> --- a/scripts/checkpatch.pl
>+++ b/scripts/checkpatch.pl
> @ @ -2418,7 +2418,7 @@ sub process {
> }
> }
>
> - if ($line =~ /^\+.*\(\s*$Type\s*\)[ \t]+(?!$Assignment|$Arithmetic)/) {
> + if ($line =~ /^\+.*\(\s*$Type\s*\)[ \t]+(?!$Assignment|$Arithmetic|{)/) {
> if (CHK("SPACING",
> "No space is necessary after a cast\n" . $herecurr) &&
> $fix) {

That fixed it.

Thanks,
Hartley




\
 
 \ /
  Last update: 2014-07-22 22:21    [W:0.040 / U:1.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site