Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2465903rwb; Fri, 9 Dec 2022 02:25:21 -0800 (PST) X-Google-Smtp-Source: AA0mqf4iPtNubu5uiQXa+PlYaHyB7P21exmNZMMbFxzJ3a1yr6cIDeW1JljEETaiQEtHeztWcmUz X-Received: by 2002:a17:90a:989:b0:219:10b3:c7b5 with SMTP id 9-20020a17090a098900b0021910b3c7b5mr6101403pjo.49.1670581521778; Fri, 09 Dec 2022 02:25:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670581521; cv=none; d=google.com; s=arc-20160816; b=I5kR4K/bDCoEvkWgwJ4gyP5qFcFW0OzjmYNuTDiMUvd9Kgv7S1sMoApO1HSVTN9Gcg fTZf4Pd9r7wEHI9fcepL0OtO7t+GG+EtY6RDLumw48hljLVpZHDW3fwZbcMxVTfwQxT2 U65p+f2LG68dIjdBF9EvstrzE4uQyzP9zJoB/IH4ItbU96WPLngCQaMr+0uvwBPnRead SdZ9hbNOcCHlpETTT5AxwXyBDTZGfeAkoGrw5VKKYREQQr/sstpUYjsftE9dUvjnhNFw t9amfsWRbeXYfqFr2c1UJg2yWiFMi8guhJQGszjuEiTpV6297GlDicGZEnWHJ0qETprU +QLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id; bh=/B4rqJHPInoiaA9s9rzv3gDi+Wz0PgN1wZ6vaq+Yw58=; b=r/2mEJgzpkXdhgN02/b//jEm2mMQ6pXPU/bLtHQegvpkM3Nx4SBFo+cPuCu4Cj2vAJ ghGuXEarOOIe4SgO/b1lavaBW9PFwnII+5+FtmCC0u9qDbJZFoSM/gRPIr9II8qTsxO/ hVbJxS3YUDkibMcpYE2amyl20WVY/A2hLl8UKFSuLbgppwnvCBdhzyotfDhGDI1NVRwq 3ljxTwoacUeWMj81cziI9xApvXKOz6usM7RfakNSidawzLBEx/J8stPq7dsjAzuaJXSt S0uQ1sL+0lgzXLTZDPnz4OfW9diJpyNHi3cvalp0hcfDc7EyluIqan1GUzo0DCLFB5fe vxWQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pc13-20020a17090b3b8d00b0021fd4804492si109680pjb.179.2022.12.09.02.25.11; Fri, 09 Dec 2022 02:25:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229735AbiLIJza (ORCPT + 74 others); Fri, 9 Dec 2022 04:55:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230010AbiLIJzE (ORCPT ); Fri, 9 Dec 2022 04:55:04 -0500 Received: from wp530.webpack.hosteurope.de (wp530.webpack.hosteurope.de [80.237.130.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16D2C59FDD for ; Fri, 9 Dec 2022 01:54:58 -0800 (PST) Received: from [2a02:8108:963f:de38:eca4:7d19:f9a2:22c5]; authenticated by wp530.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) id 1p3a5o-0001pj-A2; Fri, 09 Dec 2022 10:54:56 +0100 Message-ID: Date: Fri, 9 Dec 2022 10:54:55 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Content-Language: en-US, de-DE To: Joe Perches , =?UTF-8?Q?Kai_Wasserb=c3=a4ch?= , linux-kernel@vger.kernel.org Cc: Andrew Morton , Andy Whitcroft , Dwaipayan Ray , Lukas Bulwahn References: <4af6cd7f0833f18e9eee8caba1913e682c5ec071.1670527774.git.kai@dev.carbon-project.org> <3953eb4913bf9b5610854624c4c632e710cd1ec9.camel@perches.com> From: Thorsten Leemhuis Subject: Re: [PATCH 2/2] checkpatch: warn when Reported-by: is not followed by Link: In-Reply-To: <3953eb4913bf9b5610854624c4c632e710cd1ec9.camel@perches.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-bounce-key: webpack.hosteurope.de;linux@leemhuis.info;1670579698;f7c81136; X-HE-SMSGID: 1p3a5o-0001pj-A2 X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08.12.22 21:21, Joe Perches wrote: > On Thu, 2022-12-08 at 20:32 +0100, Kai Wasserbäch wrote: >> Encourage patch authors to link to reports by issuing a warning, if >> a Reported-by: is not accompanied by a link to the report. Those links >> are often extremely useful for any code archaeologist that wants to know >> more about the backstory of a change than the commit message provides. >> That includes maintainers higher up in the patch-flow hierarchy, which >> is why Linus asks developers to add such links [1, 2, 3]. To quote [1]: >> >>> Again, the commit has a link to the patch *submission*, which is >>> almost entirely useless. There's no link to the actual problem the >>> patch fixes. >>> >>> [...] >>> >>> Put another way: I can see that >>> >>> Reported-by: Zhangfei Gao >>> >>> in the commit, but I don't have a clue what the actual report was, and >>> there really isn't enough information in the commit itself, except for >>> a fairly handwavy "Device drivers might, for instance, still need to >>> flush operations.." >>> >>> I don't want to know what device drivers _might_ do. I would want to >>> have an actual pointer to what they do and where. >> >> Another reason why these links are wanted: the ongoing regression >> tracking efforts can only scale with them, as they allow the regression >> tracking bot 'regzbot' to automatically connect tracked reports with >> patches that are posted or committed to fix tracked regressions. > [] >> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > [] >> @@ -3144,6 +3144,20 @@ sub process { >> "Co-developed-by and Signed-off-by: name/email do not match \n" . "$here\n" . $rawline . "\n" .$rawlines[$linenr]); > > I believe this use of '"$here\n" . $rawline . "\n"' to be a defect. > I think this should just use $herecurr > > And the unnecessary space before a newline is an abomination ;) > > "Co-developed-by and Signed-off-by: name/email do not match\n" . $herecurr . $rawlines[$linenr]); Well, that's existing code. Want me to add a separate patch that fixes both of these aspects up in that area? >> + >> + # check if Reported-by: is followed by a Link: >> + if ($sign_off =~ /^reported-by:$/i) { >> + if (!defined $lines[$linenr]) { >> + WARN("BAD_REPORTED_BY_LINK", >> + "Reported-by: should be immediately followed by Link: to the report\n" . "$here\n" . $rawline); >> + } elsif ($rawlines[$linenr] !~ /^\s*link:\s*(.*)/i) { >> + WARN("BAD_REPORTED_BY_LINK", >> + "Reported-by: should be immediately followed by Link: to the report\n" . "$here\n" . $rawline . "\n" .$rawlines[$linenr]); >> + } elsif ($lines[$linenr] !~ /https?:\/\//i) { >> + WARN("BAD_REPORTED_BY_LINK", >> + "Link: following Reported-by: should contain an URL\n" . "$here\n" . $rawline . "\n" .$rawlines[$linenr]); > > Please use a space before and after a string concatenation '.' Okay, went with " . $herecurr . $rawlines[$linenr]" here, the result seems to be the same afaics. > English generally uses "a URL" and not "an URL" > https://www.techtarget.com/whatis/feature/Which-is-correct-a-URL-or-an-URL Thx! /me grumbles, he should have remembered that Ciao, Thorsten