* [PATCH] checkpatch: Fix ignoring cover-letter logic
@ 2017-09-09 9:04 Stafford Horne
2017-09-10 18:08 ` Joe Perches
0 siblings, 1 reply; 2+ messages in thread
From: Stafford Horne @ 2017-09-09 9:04 UTC (permalink / raw)
To: joe; +Cc: Stafford Horne, Andy Whitcroft, linux-kernel
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] checkpatch: Fix ignoring cover-letter logic
2017-09-09 9:04 [PATCH] checkpatch: Fix ignoring cover-letter logic Stafford Horne
@ 2017-09-10 18:08 ` Joe Perches
0 siblings, 0 replies; 2+ messages in thread
From: Joe Perches @ 2017-09-10 18:08 UTC (permalink / raw)
To: Stafford Horne, Andrew Morton; +Cc: Andy Whitcroft, linux-kernel
On Sat, 2017-09-09 at 18:04 +0900, Stafford Horne wrote:
> 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>
Acked-by: Joe Perches <joe@perches.com>
> diff --git 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");
> }
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-09-10 18:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-09 9:04 [PATCH] checkpatch: Fix ignoring cover-letter logic Stafford Horne
2017-09-10 18:08 ` Joe Perches
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox