Skip to content

Commit

Permalink
checkpatch: make email address check case insensitive
Browse files Browse the repository at this point in the history
Instead of checkpatch requiring the patch author to exactly match the
signed-off-by tag, commit 48ca2d8 ("checkpatch: add new warnings to
author signoff checks.") safely relaxed this requirement.

Although the local-part of an email address (local-part@domain), may be
case sensitive, exploiting the case sensitivity of mailbox local-parts
impedes interoperability and is discouraged.  Mailbox domains follow
normal DNS rules and are hence not case sensitive.  (Refer to
https://datatracker.ietf.org/doc/html/rfc5321#section-2.4.)

Further relax the patch author and signed-off-by tag comparison by making
the email address check case insensitive.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Mimi Zohar <[email protected]>
Acked-by: Joe Perches <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
mimizohar authored and torvalds committed Sep 8, 2021
1 parent d2af5aa commit 046fc74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -2909,10 +2909,10 @@ sub process {
my ($email_name, $email_comment, $email_address, $comment1) = parse_email($ctx);
my ($author_name, $author_comment, $author_address, $comment2) = parse_email($author);

if ($email_address eq $author_address && $email_name eq $author_name) {
if (lc $email_address eq lc $author_address && $email_name eq $author_name) {
$author_sob = $ctx;
$authorsignoff = 2;
} elsif ($email_address eq $author_address) {
} elsif (lc $email_address eq lc $author_address) {
$author_sob = $ctx;
$authorsignoff = 3;
} elsif ($email_name eq $author_name) {
Expand Down

0 comments on commit 046fc74

Please sign in to comment.