summary refs log tree commit diff stats
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
authorStefano Garzarella <sgarzare@redhat.com>2020-09-17 19:02:12 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2020-09-30 19:11:36 +0200
commitfb4176d0e89fbe2be641827f2037883d99b1e94f (patch)
tree997773ade6e70708d33c4ff6f54bc98c604a4f07 /scripts/checkpatch.pl
parent4174495408afdf27b6bfb32701c3fd9775e6bca3 (diff)
downloadfocaccia-qemu-fb4176d0e89fbe2be641827f2037883d99b1e94f.tar.gz
focaccia-qemu-fb4176d0e89fbe2be641827f2037883d99b1e94f.zip
checkpatch: avoid error on cover letter files
Running checkpatch on a directory that contains a cover letter reports
this error:

    Checking /tmp/tmpbnngauy3/0000-cover-letter.patch...
    ERROR: Does not appear to be a unified-diff format patch

    total: 1 errors, 0 warnings, 0 lines checked

Let's skip cover letter as it is already done in the Linux kernel
commits 06330fc40e3f ("checkpatch: avoid NOT_UNIFIED_DIFF errors
on cover-letter.patch files") and a08ffbef4ab7 ("checkpatch: fix
ignoring cover-letter logic").

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Message-Id: <20200917170212.92672-1-sgarzare@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-xscripts/checkpatch.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 1ba8a3810b..ca4445ffe9 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3005,7 +3005,7 @@ sub process {
 		return 1;
 	}
 
-	if (!$is_patch) {
+	if (!$is_patch && $filename !~ /cover-letter\.patch$/) {
 		ERROR("Does not appear to be a unified-diff format patch\n");
 	}