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>
This commit is contained in:
Andy Whitcroft 2009-02-27 14:03:06 -08:00 коммит произвёл Linus Torvalds
Родитель f4a8773676
Коммит e2f7aa4b8b
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -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");
}