lkml.org 
[lkml]   [2009]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: checkpatch --file warns about p0 patch


Andy Whitcroft wrote:
> On Mon, Feb 23, 2009 at 04:20:21PM +0200, Mike Rapoport wrote:
>> When running checkpatch.pl with --file option it warns about -p0 patch:
>>
>> ./scripts/checkpatch.pl --file ./drivers/rtc/rtc-v3020.c
>> WARNING: patch prefix '.' exists, appears to be a -p0 patch
>>
>> total: 0 errors, 1 warnings, 263 lines checked
>>
>> ./drivers/rtc/rtc-v3020.c has style problems, please review. If any of these errors
>> are false positives report them to the maintainer, see
>> CHECKPATCH in MAINTAINERS.
>>
>> I hope this is the fix that'll work:
>>
>> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
>> index 45eb0ae..1869388 100755
>> --- a/scripts/checkpatch.pl
>> +++ b/scripts/checkpatch.pl
>> @@ -1240,7 +1240,7 @@ sub process {
>> $realfile =~ s@^([^/]*)/@@;
>>
>> $p1_prefix = $1;
>> - if ($tree && $p1_prefix ne '' && -e "$root/$p1_prefix") {
>> + if (!$file && $tree && $p1_prefix ne '' && -e "$root/$p1_prefix") {
>> WARN("patch prefix '$p1_prefix' exists, appears to be a -p0 patch\n");
>> }
>>
>>
>>
>> --
>
> Hmm, that should already be fixed in the version Andrew Morton has.

I've run the version from Linus tree.

> Could you test with v0.28 and confirm its already fixed?

v0.28 works Ok.

>
> http://www.kernel.org/pub/linux/kernel/people/apw/checkpatch/checkpatch.pl-v0.28
>
> -apw
>

--
Sincerely yours,
Mike.



\
 
 \ /
  Last update: 2009-02-23 15:59    [W:0.683 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site