From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55382C433DF for ; Tue, 13 Oct 2020 06:57:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 06E22207C3 for ; Tue, 13 Oct 2020 06:57:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732580AbgJMG5x (ORCPT ); Tue, 13 Oct 2020 02:57:53 -0400 Received: from smtprelay0185.hostedemail.com ([216.40.44.185]:55726 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727353AbgJMG5x (ORCPT ); Tue, 13 Oct 2020 02:57:53 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay08.hostedemail.com (Postfix) with ESMTP id C2FB8182CED34; Tue, 13 Oct 2020 06:57:52 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: name14_1e1732027201 X-Filterd-Recvd-Size: 2127 Received: from XPS-9350.home (unknown [47.151.133.149]) (Authenticated sender: joe@perches.com) by omf15.hostedemail.com (Postfix) with ESMTPA; Tue, 13 Oct 2020 06:57:51 +0000 (UTC) Message-ID: Subject: Re: [PATCH v2] checkpatch: fix missing whitespace in formatted email From: Joe Perches To: Dwaipayan Ray Cc: linux-kernel-mentees@lists.linuxfoundation.org, linux-kernel@vger.kernel.org, lukas.bulwahn@gmail.com Date: Mon, 12 Oct 2020 23:57:50 -0700 In-Reply-To: <20201013063642.39810-1-dwaipayanray1@gmail.com> References: <20201013063642.39810-1-dwaipayanray1@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.36.4-0ubuntu1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2020-10-13 at 12:06 +0530, Dwaipayan Ray wrote: > Commit 0c01921e56f9 ("checkpatch: add new warnings to author signoff > checks.") introduced new checks for author sign off. The format_email > procedure was modified to add comment blocks to the formatted email. But > no space was added between the email address and mail comment. > > This causes wrong email formatting in cases where the email is in the form > "author@example.com (Comment block)". The space between the address and > comment block is removed, which causes incorrect parsing of the > formatted email. > > An evaluation on checkpatch brought up this case. For example, > on commit 1129d31b55d5 ("ima: Fix ima digest hash table key calculation"), > the following warning was reported: > > WARNING:BAD_SIGN_OFF: email address 'David.Laight@aculab.com (big endian > system concerns)' might be better as 'David.Laight@aculab.com(big endian > system concerns)' Strictly, a comment or multiple comments can exist in any part of an email "John (Jon) Smith (Smitty) (tld is the best tld) > Add a single space in between the address and comment when the > extracted comment is not empty. So after the address is not necessarily the best location for a comment.