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=-9.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 E577FC5517A for ; Sun, 8 Nov 2020 19:57:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 97EC3206F4 for ; Sun, 8 Nov 2020 19:57:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728451AbgKHT5K (ORCPT ); Sun, 8 Nov 2020 14:57:10 -0500 Received: from smtprelay0082.hostedemail.com ([216.40.44.82]:55314 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727999AbgKHT5K (ORCPT ); Sun, 8 Nov 2020 14:57:10 -0500 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay03.hostedemail.com (Postfix) with ESMTP id D8B9E837F24C; Sun, 8 Nov 2020 19:57:08 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: dog03_0a0812a272e6 X-Filterd-Recvd-Size: 2111 Received: from XPS-9350.home (unknown [47.151.133.149]) (Authenticated sender: joe@perches.com) by omf11.hostedemail.com (Postfix) with ESMTPA; Sun, 8 Nov 2020 19:57:07 +0000 (UTC) Message-ID: Subject: Re: [PATCH] checkpatch: add fix for BAD_SIGN_OFF From: Joe Perches To: Aditya Srivastava Cc: lukas.bulwahn@gmail.com, dwaipayanray1@gmail.com, linux-kernel-mentees@lists.linuxfoundation.org, linux-kernel@vger.kernel.org Date: Sun, 08 Nov 2020 11:57:06 -0800 In-Reply-To: <20201108134317.25400-1-yashsri421@gmail.com> References: <20201108134317.25400-1-yashsri421@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.38.1-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2020-11-08 at 19:13 +0530, Aditya Srivastava wrote: > Currently, checkpatch warns us if the author of the commit signs-off > as co-developed-by. [] > A quick manual check found out that all fixes were correct in those > cases. [] > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl [] > @@ -2827,8 +2827,11 @@ sub process { >  # Check Co-developed-by: immediately followed by Signed-off-by: with same name and email >   if ($sign_off =~ /^co-developed-by:$/i) { >   if ($email eq $author) { > - WARN("BAD_SIGN_OFF", > - "Co-developed-by: should not be used to attribute nominal patch author '$author'\n" . "$here\n" . $rawline); > + if (WARN("BAD_SIGN_OFF", > + "Co-developed-by: should not be used to attribute nominal patch author '$author'\n" . "$here\n" . $rawline) && > + $fix) { > + fix_delete_line($fixlinenr, $rawline); > + } >   } >   if (!defined $lines[$linenr]) { >   WARN("BAD_SIGN_OFF", Looks OK to me. Another option might be to add a Signed-off-by: line derived from any "From:" line when: if ($is_patch && $has_commit_log && $chk_signoff) { if ($signoff == 0) { ERROR("MISSING_SIGN_OFF", "Missing Signed-off-by: line(s)\n"); etc... 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=-9.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 2FAA8C388F9 for ; Sun, 8 Nov 2020 20:15:58 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7D1B9206F4 for ; Sun, 8 Nov 2020 20:15:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7D1B9206F4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=perches.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-kernel-mentees-bounces@lists.linuxfoundation.org Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 037CE86755; Sun, 8 Nov 2020 20:15:57 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Z0LDS4xpxeSa; Sun, 8 Nov 2020 20:15:56 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id 12D61866B9; Sun, 8 Nov 2020 20:15:56 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 00C03C0889; Sun, 8 Nov 2020 20:15:56 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 45813C016F for ; Sun, 8 Nov 2020 20:15:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 35FBD87044 for ; Sun, 8 Nov 2020 20:15:55 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aUTH7QthKXLT for ; Sun, 8 Nov 2020 20:15:54 +0000 (UTC) X-Greylist: delayed 00:18:43 by SQLgrey-1.7.6 Received: from smtprelay.hostedemail.com (smtprelay0235.hostedemail.com [216.40.44.235]) by hemlock.osuosl.org (Postfix) with ESMTPS id 4D6E087043 for ; Sun, 8 Nov 2020 20:15:54 +0000 (UTC) Received: from smtprelay.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by smtpgrave04.hostedemail.com (Postfix) with ESMTP id B36D31800802B for ; Sun, 8 Nov 2020 19:57:11 +0000 (UTC) Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay03.hostedemail.com (Postfix) with ESMTP id D8B9E837F24C; Sun, 8 Nov 2020 19:57:08 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: dog03_0a0812a272e6 X-Filterd-Recvd-Size: 2111 Received: from XPS-9350.home (unknown [47.151.133.149]) (Authenticated sender: joe@perches.com) by omf11.hostedemail.com (Postfix) with ESMTPA; Sun, 8 Nov 2020 19:57:07 +0000 (UTC) Message-ID: From: Joe Perches To: Aditya Srivastava Date: Sun, 08 Nov 2020 11:57:06 -0800 In-Reply-To: <20201108134317.25400-1-yashsri421@gmail.com> References: <20201108134317.25400-1-yashsri421@gmail.com> User-Agent: Evolution 3.38.1-1 MIME-Version: 1.0 Cc: linux-kernel-mentees@lists.linuxfoundation.org, linux-kernel@vger.kernel.org, dwaipayanray1@gmail.com Subject: Re: [Linux-kernel-mentees] [PATCH] checkpatch: add fix for BAD_SIGN_OFF X-BeenThere: linux-kernel-mentees@lists.linuxfoundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: linux-kernel-mentees-bounces@lists.linuxfoundation.org Sender: "Linux-kernel-mentees" On Sun, 2020-11-08 at 19:13 +0530, Aditya Srivastava wrote: > Currently, checkpatch warns us if the author of the commit signs-off > as co-developed-by. [] > A quick manual check found out that all fixes were correct in those > cases. [] > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl [] > @@ -2827,8 +2827,11 @@ sub process { > =A0# Check Co-developed-by: immediately followed by Signed-off-by: with s= ame name and email > =A0 if ($sign_off =3D~ /^co-developed-by:$/i) { > =A0 if ($email eq $author) { > - WARN("BAD_SIGN_OFF", > - "Co-developed-by: should not be used to attribute nominal pat= ch author '$author'\n" . "$here\n" . $rawline); > + if (WARN("BAD_SIGN_OFF", > + "Co-developed-by: should not be used to attribute nominal patch a= uthor '$author'\n" . "$here\n" . $rawline) && > + $fix) { > + fix_delete_line($fixlinenr, $rawline); > + } > =A0 } > =A0 if (!defined $lines[$linenr]) { > =A0 WARN("BAD_SIGN_OFF", Looks OK to me. Another option might be to add a Signed-off-by: line derived from any "From:" line when: if ($is_patch && $has_commit_log && $chk_signoff) { if ($signoff =3D=3D 0) { ERROR("MISSING_SIGN_OFF", "Missing Signed-off-by: line(s)\n"); etc... _______________________________________________ Linux-kernel-mentees mailing list Linux-kernel-mentees@lists.linuxfoundation.org https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees