lkml.org 
[lkml]   [2017]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] checkpatch: Fix ignoring cover-letter logic
Date
Currently running checkpatch on a directory with a cover-letter.patch
file reports the following error:

-----------------------------------------
patches/smp-v2/v2-0000-cover-letter.patch
-----------------------------------------

ERROR: Does not appear to be a unified-diff format patch

The logic to suppress the unified-diff check for cover letters is there
but is checking $file instead of $filename. Fix the variable to use the
correct one.

Signed-off-by: Stafford Horne <shorne@gmail.com>
---
scripts/checkpatch.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 2287a0bca863..9e46986e06b8 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -6365,7 +6365,7 @@ sub process {
exit(0);
}

- if (!$is_patch && $file !~ /cover-letter\.patch$/) {
+ if (!$is_patch && $filename !~ /cover-letter\.patch$/) {
ERROR("NOT_UNIFIED_DIFF",
"Does not appear to be a unified-diff format patch\n");
}
--
2.13.5
\
 
 \ /
  Last update: 2017-09-09 11:04    [W:0.043 / U:0.088 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site