Merge "checkpatch: accept qca.qualcomm email addresses"

This commit is contained in:
Linux Build Service Account 2017-02-25 01:09:29 -08:00 committed by Gerrit - the friendly Code Review server
commit 0845c678f2

View file

@ -60,6 +60,8 @@ my $spelling_file = "$D/spelling.txt";
my $codespell = 0; my $codespell = 0;
my $codespellfile = "/usr/share/codespell/dictionary.txt"; my $codespellfile = "/usr/share/codespell/dictionary.txt";
my $color = 1; my $color = 1;
my $qca_sign_off = 0;
my $codeaurora_sign_off = 0;
sub help { sub help {
my ($exitcode) = @_; my ($exitcode) = @_;
@ -2429,9 +2431,15 @@ sub process {
"email address '$email' might be better as '$suggested_email$comment'\n" . $herecurr); "email address '$email' might be better as '$suggested_email$comment'\n" . $herecurr);
} }
} }
if ($chk_author && $line =~ /^\s*signed-off-by:.*(quicinc|qualcomm)\.com/i) { if ($chk_author) {
WARN("BAD_SIGN_OFF", if ($line =~ /^\s*signed-off-by:.*qca\.qualcomm\.com/i) {
"invalid Signed-off-by identity\n" . $line ); $qca_sign_off = 1;
} elsif ($line =~ /^\s*signed-off-by:.*codeaurora\.org/i) {
$codeaurora_sign_off = 1;
} elsif ($line =~ /^\s*signed-off-by:.*(quicinc|qualcomm)\.com/i) {
WARN("BAD_SIGN_OFF",
"invalid Signed-off-by identity\n" . $line );
}
} }
# Check for duplicate signatures # Check for duplicate signatures
@ -2558,7 +2566,8 @@ sub process {
} }
#check the patch for invalid author credentials #check the patch for invalid author credentials
if ($chk_author && $line =~ /^From:.*(quicinc|qualcomm)\.com/) { if ($chk_author && !($line =~ /^From:.*qca\.qualcomm\.com/) &&
$line =~ /^From:.*(quicinc|qualcomm)\.com/) {
WARN("BAD_AUTHOR", "invalid author identity\n" . $line ); WARN("BAD_AUTHOR", "invalid author identity\n" . $line );
} }
@ -6042,6 +6051,11 @@ sub process {
} }
} }
if ($chk_author && $qca_sign_off && !$codeaurora_sign_off) {
WARN("BAD_SIGN_OFF",
"QCA Signed-off-by requires CODEAURORA Signed-off-by\n" . $line );
}
# If we have no input at all, then there is nothing to report on # If we have no input at all, then there is nothing to report on
# so just keep quiet. # so just keep quiet.
if ($#rawlines == -1) { if ($#rawlines == -1) {