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.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=unavailable 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 14CE6C433E0 for ; Mon, 27 Jul 2020 22:00:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D36BE206D7 for ; Mon, 27 Jul 2020 22:00:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="S1ebDFYG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726237AbgG0WA3 (ORCPT ); Mon, 27 Jul 2020 18:00:29 -0400 Received: from hqnvemgate26.nvidia.com ([216.228.121.65]:13871 "EHLO hqnvemgate26.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726110AbgG0WA2 (ORCPT ); Mon, 27 Jul 2020 18:00:28 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Mon, 27 Jul 2020 15:00:15 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Mon, 27 Jul 2020 15:00:28 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Mon, 27 Jul 2020 15:00:28 -0700 Received: from [172.20.40.94] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Mon, 27 Jul 2020 22:00:28 +0000 Subject: Re: [PATCH] checkpatch: improve MAINTAINERS file update test To: Joe Perches , CC: LKML References: <20200727205856.28343-1-ddadap@nvidia.com> <0801ef9d2489ed816ec97ee3054de2d20bfac14c.camel@perches.com> From: Daniel Dadap Message-ID: <41c8d9a1-cc4d-7ff0-c269-3f631b7d4a78@nvidia.com> Date: Mon, 27 Jul 2020 17:02:05 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <0801ef9d2489ed816ec97ee3054de2d20bfac14c.camel@perches.com> X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) To HQMAIL107.nvidia.com (172.20.187.13) Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1595887215; bh=NfYWylJQoMGZ9rIrniDEzW+cASJlZAmTbI3bHVXz5DU=; h=X-PGP-Universal:Subject:To:CC:References:From:Message-ID:Date: User-Agent:MIME-Version:In-Reply-To:X-Originating-IP: X-ClientProxiedBy:Content-Type:Content-Transfer-Encoding: Content-Language; b=S1ebDFYG8FZgOp/MfW4t1pmZV+00223kTg3Sj0udZAcDabs7nZZGX90RIWMGpkfYJ dlYOdk7w2eP2DMyxMyAJ2rFINp0RLwss+n9/PxASx+mtu9eIZQbIukYpDSJZ9vzcpW xkKkk69E+DLwEJVgNGheM/b/PqDkZrJKlIeZMayaaUEt0KVA+kTXQxfGyTTsXlt4ed euRX0//63tfOXOF8GzRApXgsJ5MHkJlzjCluH3Vlj1aF4ZZt1HXOmG6YjhFsp9If6Q C7h8ccFmPxAOxinO9HY9NURf09MKVcorKlvOIlLdzz981wXjaiZcARMCuDiuJcrwE1 Ne7ubaYnLfwUw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/27/20 4:07 PM, Joe Perches wrote: > External email: Use caution opening links or attachments > > > On Mon, 2020-07-27 at 15:58 -0500, Daniel Dadap wrote: >> Add an additional regular expression to detect updates to the >> MAINTAINERS file as reported in the unified diffs generated by >> `git format-patch`. This suppresses the "does MAINTAINERS need >> updating" message when MAINTAINERS is updated with this format. > Please cc at least LKML. Oops; thanks for adding the list. I'll be sure to include it for any revised patches. >> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > [] >> @@ -2621,7 +2621,8 @@ sub process { >> >> # Check if MAINTAINERS is being updated. If so, there's probably no need to >> # emit the "does MAINTAINERS need updating?" message on file add/move/delete >> - if ($line =~ /^\s*MAINTAINERS\s*\|/) { >> + if ($line =~ /^\s*MAINTAINERS\s*\|/ || >> + $line =~ /^[-+]{3} [ab]\/MAINTAINERS$/) { > I don't believe this works well as any test > for a file modification to MAINTAINERS occurs > after the block that would show a diffstat > where the warning is emitted. Hmm. It must have worked for me because the MAINTAINERS file appeared earlier in the patch than a newly added file in a patch I was checking that triggers this warning before this change, but doesn't after this change. This needn't be the case, though. Would it make sense to move the check for a diffstat-style /^\sMAINTAINERS\s*\|/ as well as a unidiff-style /^[-+]{3} [ab]\/MAINTAINERS$/ to the pre-scan sanitize phase?