checkpatch --file warns about p0 patch
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:
scripts/checkpatch.pl +1 -1
@@ -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"); }
Signature · 2 lines
Sincerely yours, Mike.
Andy Whitcroft
maintainerQuoted 29 lines · Mike Rapoport
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 patchtotal: 0 errors, 1 warnings, 263 lines checked
./drivers/rtc/rtc-v3020.chas style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH inMAINTAINERS.I hope this is the fix that'll work:
scripts/checkpatch.pl +1
-1@@ -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"); }Signature · 1 line
--
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
Quoted 29 lines · Andy Whitcroft
Quoted 28 lines · Mike Rapoport
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 patchtotal: 0 errors, 1 warnings, 263 lines checked
./drivers/rtc/rtc-v3020.chas style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH inMAINTAINERS.I hope this is the fix that'll work:
scripts/checkpatch.pl +1
-1@@ -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"); }
Quoted 3 lines
Quoted 1 line
Hmm, that should already be fixed in the version Andrew Morton has.
I've run the version from Linus tree.
Quoted 1 line
Could you test with v0.28 and confirm its already fixed?
v0.28 works Ok.
Signature · 2 lines
Sincerely yours, Mike.
Quoted 1 line · On Mon, 23 Feb 2009 14:43:12 +0000 Andy Whitcroft <[email protected]> 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?
Andy Whitcroft
maintainerQuoted 16 lines · Andrew Morton
Quoted 1 line · On Mon, 23 Feb 2009 14:43:12 +0000 Andy Whitcroft <[email protected]> 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
Quoted 2 lines
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