[PATCH 2/8] 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@xxxxxxxxxxxxx>
---
scripts/checkpatch.pl | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index c71a0fa..5ffc940 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");
}

--
1.6.1.2.419.g0d87e

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: how to write sysrexx
    ... I now have a sysrexx question.... ... How do suppress the '/DI,L=Z' output after you issue the command. ... I used to work a lot of Netview and rexx inside Netview and we had IBM ... We use question mark as the command character for secondary JES2 ...
    (bit.listserv.ibm-main)
  • Re: Executing secondary command in shell.run
    ... The second command with double double quotation marks definitely affects the first commands here. ... Which wrongly suppress the "AAA " part. ...
    (microsoft.public.scripting.vbscript)
  • Re: How to suppress Word dialogs during merge
    ... Word New User FAQ & Web Directory: http://addbalance.com/word ... > the command line and would like to suppress (or ... > Sub MyMerge() ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Design question: C command calling back into Tcl
    ... displaying and triggering the data. ... > - This command produces lots of data. ... > - The C code puts the data into a C variable which is linked to a Tcl ...
    (comp.lang.tcl)
  • Suppressing PER messages
    ... Is there a way to suppress the message 'Command Complete' issued by a PER CMD? ... Issue 'PER DIAG 58 PRINTER CMD DUMP 0.20;BASE3' ...
    (bit.listserv.ibm-main)

Loading