* checkpatch --file warns about p0 patch
@ 2009-02-23 14:20 Mike Rapoport
2009-02-23 14:43 ` Andy Whitcroft
0 siblings, 1 reply; 5+ messages in thread
From: Mike Rapoport @ 2009-02-23 14:20 UTC (permalink / raw)
To: apw, LKML
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");
}
--
Sincerely yours,
Mike.
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: checkpatch --file warns about p0 patch
2009-02-23 14:20 checkpatch --file warns about p0 patch Mike Rapoport
@ 2009-02-23 14:43 ` Andy Whitcroft
2009-02-23 14:56 ` Mike Rapoport
2009-02-23 23:04 ` Andrew Morton
0 siblings, 2 replies; 5+ messages in thread
From: Andy Whitcroft @ 2009-02-23 14:43 UTC (permalink / raw)
To: Mike Rapoport; +Cc: LKML
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.
Could you test with v0.28 and confirm its already fixed?
http://www.kernel.org/pub/linux/kernel/people/apw/checkpatch/checkpatch.pl-v0.28
-apw
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: checkpatch --file warns about p0 patch
2009-02-23 14:43 ` Andy Whitcroft
@ 2009-02-23 14:56 ` Mike Rapoport
2009-02-23 23:04 ` Andrew Morton
1 sibling, 0 replies; 5+ messages in thread
From: Mike Rapoport @ 2009-02-23 14:56 UTC (permalink / raw)
To: Andy Whitcroft; +Cc: LKML
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: checkpatch --file warns about p0 patch
2009-02-23 14:43 ` Andy Whitcroft
2009-02-23 14:56 ` Mike Rapoport
@ 2009-02-23 23:04 ` Andrew Morton
2009-02-28 23:55 ` Andy Whitcroft
1 sibling, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2009-02-23 23:04 UTC (permalink / raw)
To: Andy Whitcroft; +Cc: mike, linux-kernel
On Mon, 23 Feb 2009 14:43:12 +0000
Andy Whitcroft <apw@canonical.com> wrote:
> Hmm, that should already be fixed in the version Andrew Morton has.
Hmm, all of these:
checkpatch-make-in_atomic-ok-in-the-core.patch
checkpatch-do-not-warn-about-p0-patches-when-checking-files.patch
checkpatch-correctly-handle-type-spacing-in-the-face-of-modifiers.patch
checkpatch-pointer-type-star-may-have-modifiers-following.patch
checkpatch-a-modifier-is-not-an-identifier-at-the-end-of-a-type.patch
checkpatch-extend-attribute-testing-to-all-modifiers.patch
checkpatch-add-__ref-as-a-sparse-modifier.patch
checkpatch-version-028.patch
apart from perhaps checkpatch-add-__ref-as-a-sparse-modifier.patch look
like bugfixes. So I suppose we should slip them into 2.6.29, yes?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: checkpatch --file warns about p0 patch
2009-02-23 23:04 ` Andrew Morton
@ 2009-02-28 23:55 ` Andy Whitcroft
0 siblings, 0 replies; 5+ messages in thread
From: Andy Whitcroft @ 2009-02-28 23:55 UTC (permalink / raw)
To: Andrew Morton; +Cc: mike, linux-kernel
On Mon, Feb 23, 2009 at 03:04:05PM -0800, Andrew Morton wrote:
> On Mon, 23 Feb 2009 14:43:12 +0000
> Andy Whitcroft <apw@canonical.com> wrote:
>
> > Hmm, that should already be fixed in the version Andrew Morton has.
>
> Hmm, all of these:
>
> checkpatch-make-in_atomic-ok-in-the-core.patch
> checkpatch-do-not-warn-about-p0-patches-when-checking-files.patch
> checkpatch-correctly-handle-type-spacing-in-the-face-of-modifiers.patch
> checkpatch-pointer-type-star-may-have-modifiers-following.patch
> checkpatch-a-modifier-is-not-an-identifier-at-the-end-of-a-type.patch
> checkpatch-extend-attribute-testing-to-all-modifiers.patch
> checkpatch-add-__ref-as-a-sparse-modifier.patch
> checkpatch-version-028.patch
>
> apart from perhaps checkpatch-add-__ref-as-a-sparse-modifier.patch look
> like bugfixes. So I suppose we should slip them into 2.6.29, yes?
Yes those are all bugfixes. If we can get them in that would be good.
-apw
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-02-28 23:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-23 14:20 checkpatch --file warns about p0 patch Mike Rapoport
2009-02-23 14:43 ` Andy Whitcroft
2009-02-23 14:56 ` Mike Rapoport
2009-02-23 23:04 ` Andrew Morton
2009-02-28 23:55 ` Andy Whitcroft
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox