public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 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

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