aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-09-11 17:23:57 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-09-11 18:58:42 -0400
commit7e51f1979237e01bcd4e04e434c5da79151f08f8 (patch)
tree17cfd69cb04e0ed9e66d5f436199f9dc8bbe3fea /scripts/checkpatch.pl
parentd62a201f24cba74e2fbf9f6f7af86ff5f5e276fc (diff)
checkpatch: check for duplicate signatures
Emit a warning when a signature is used more than once. 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>
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-xscripts/checkpatch.pl12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index c00e5108c0d2..7c79c91662c8 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1544,6 +1544,7 @@ sub process {
1544 my %suppress_export; 1544 my %suppress_export;
1545 my $suppress_statement = 0; 1545 my $suppress_statement = 0;
1546 1546
1547 my %signatures = ();
1547 1548
1548 # Pre-scan the patch sanitizing the lines. 1549 # Pre-scan the patch sanitizing the lines.
1549 # Pre-scan the patch looking for any __setup documentation. 1550 # Pre-scan the patch looking for any __setup documentation.
@@ -1793,6 +1794,17 @@ sub process {
1793 "email address '$email' might be better as '$suggested_email$comment'\n" . $herecurr); 1794 "email address '$email' might be better as '$suggested_email$comment'\n" . $herecurr);
1794 } 1795 }
1795 } 1796 }
1797
1798# Check for duplicate signatures
1799 my $sig_nospace = $line;
1800 $sig_nospace =~ s/\s//g;
1801 $sig_nospace = lc($sig_nospace);
1802 if (defined $signatures{$sig_nospace}) {
1803 WARN("BAD_SIGN_OFF",
1804 "Duplicate signature\n" . $herecurr);
1805 } else {
1806 $signatures{$sig_nospace} = 1;
1807 }
1796 } 1808 }
1797 1809
1798# Check for wrappage within a valid hunk of the file 1810# Check for wrappage within a valid hunk of the file