summaryrefslogtreecommitdiffstats
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
authorAndy Whitcroft2009-02-27 23:03:06 +0100
committerLinus Torvalds2009-02-28 01:26:21 +0100
commite2f7aa4b8bc811ebf8afbdf423caf90a5a03cb08 (patch)
tree2c3dc6651cbdf54d2a7234bdaa75664b93ca2945 /scripts/checkpatch.pl
parentcheckpatch: make in_atomic ok in the core (diff)
downloadkernel-qcow2-linux-e2f7aa4b8bc811ebf8afbdf423caf90a5a03cb08.tar.gz
kernel-qcow2-linux-e2f7aa4b8bc811ebf8afbdf423caf90a5a03cb08.tar.xz
kernel-qcow2-linux-e2f7aa4b8bc811ebf8afbdf423caf90a5a03cb08.zip
checkpatch: do not warn about -p0 patches when checking files
We are triggering the -p0 check for our own diffs generated using --file command line option. Suppress this check for files. Signed-off-by: Andy Whitcroft <apw@canonical.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-xscripts/checkpatch.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index c71a0fae84df..5ffc940399be 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1240,7 +1240,8 @@ 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");
}