checkpatch: reduce MAINTAINERS update message frequency
authorJoe Perches <joe@perches.com>
Wed, 10 Dec 2014 23:51:49 +0000 (15:51 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 11 Dec 2014 01:41:12 +0000 (17:41 -0800)
When files are being added/moved/deleted and a patch contains an update to
the MAINTAINERS file, assume it's to update the MAINTAINERS file correctly
and do not emit the "does MAINTAINERS need updating?" message.

Reported by many people.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/checkpatch.pl

index 24d6702..41e7db4 100755 (executable)
@@ -2082,6 +2082,12 @@ sub process {
                        $in_commit_log = 0;
                }
 
+# Check if MAINTAINERS is being updated.  If so, there's probably no need to
+# emit the "does MAINTAINERS need updating?" message on file add/move/delete
+               if ($line =~ /^\s*MAINTAINERS\s*\|/) {
+                       $reported_maintainer_file = 1;
+               }
+
 # Check signature styles
                if (!$in_header_lines &&
                    $line =~ /^(\s*)([a-z0-9_-]+by:|$signature_tags)(\s*)(.*)/i) {