Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp2611927rwb; Fri, 20 Jan 2023 05:19:59 -0800 (PST) X-Google-Smtp-Source: AMrXdXvYPXYx7hGgjmcMftigW81IoNDpFNfOMuNDVFC/wZcrtzcOhqEzPHruFnhBAxmUDWRULBu0 X-Received: by 2002:a05:6402:d47:b0:499:376e:6b31 with SMTP id ec7-20020a0564020d4700b00499376e6b31mr13791381edb.29.1674220799520; Fri, 20 Jan 2023 05:19:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674220799; cv=none; d=google.com; s=arc-20160816; b=N5z7AYw19IW0JP1/rc2SRiroJ4AclGy5Pmm8ewL4O4Qhn9WKkqwqDNbFo0VLR5FbKy kuxr9DvXNA3b8XrjbOO5XhsOO4XdUQIT+wl8MqKp4wNbkJWirjrxAA0TQqbRczzv7VDa M9Q9o0NaT6xEkDuF9EeGDeBIdAau6B8a9m+hbtcQyvcOz4BFbcxVkkWjtGiGYEHPVeRj kUY1sGoZLtcBcrXFUuP2TBiDigU2eCBv8I52YmXfABGSrBo/sFPSblFqqkg6G6G41gRc DPvkTGNuDsLPuePytNfUMfSXvG+RLZhhUDRwlmxWUqO1+OfvyizozoRy9CV1uwPqPgxN vRvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=dXuijO9OGp8Vq/sfQ7Lfn8QrWAQCMKhSoueRZJRzGAU=; b=Kbchjqo34QcAXqP76lIUxNlncw4Cr+Bbu5PWsjcrZ5I2PckSnjM0FzpRhu3kjEBdx6 ofaf97292jhQCs9IzwtyzmzRWHv15opCss0/wpc/Z4bT22tVrHbu+Dz6luvsvHxyzJgp u/9bb237Ezf3d90BQnuXp5ACmqcned177zIsTFMw7d/trB8Pf4Fe2uqK+DZYV3kqyFTC 8VfFvvmj5Fp7i+TuQVrXBP90ZQ9CXcVHAuMjRnTJchGpoZqgKdZAVv0v9brDD2n5tLGq WpMsymJcd/XtUVAmCX/Q0W7MDB/1qfI4MTI6tygrchesLfcniVNIGHLiFMrml3RZNeQ+ +4zg== 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 qk30-20020a1709077f9e00b008711359b937si17074673ejc.165.2023.01.20.05.19.47; Fri, 20 Jan 2023 05:19:59 -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 S230209AbjATMfj (ORCPT + 49 others); Fri, 20 Jan 2023 07:35:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230147AbjATMf3 (ORCPT ); Fri, 20 Jan 2023 07:35:29 -0500 Received: from wp530.webpack.hosteurope.de (wp530.webpack.hosteurope.de [80.237.130.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1410DBD17B for ; Fri, 20 Jan 2023 04:35:24 -0800 (PST) Received: from ip4d14bd73.dynamic.kabel-deutschland.de ([77.20.189.115] helo=truhe.fritz.box); authenticated by wp530.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) id 1pIqc6-0007pV-Ds; Fri, 20 Jan 2023 13:35:22 +0100 From: Thorsten Leemhuis To: Joe Perches , Andy Whitcroft , Dwaipayan Ray , Lukas Bulwahn Cc: =?UTF-8?q?Kai=20Wasserb=C3=A4ch?= , Andrew Morton , linux-kernel@vger.kernel.org Subject: [PATCH v4 2/3] checkpatch: warn when Reported-by: is not followed by Link: Date: Fri, 20 Jan 2023 13:35:19 +0100 Message-Id: X-Mailer: git-send-email 2.39.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-bounce-key: webpack.hosteurope.de;linux@leemhuis.info;1674218125;93060bd7; X-HE-SMSGID: 1pIqc6-0007pV-Ds X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 From: Kai Wasserbäch 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. Link: https://lore.kernel.org/all/CAHk-=wjMmSZzMJ3Xnskdg4+GGz=5p5p+GSYyFBTh0f-DgvdBWg@mail.gmail.com/ [1] Link: https://lore.kernel.org/all/CAHk-=wgs38ZrfPvy=nOwVkVzjpM3VFU1zobP37Fwd_h9iAD5JQ@mail.gmail.com/ [2] Link: https://lore.kernel.org/all/CAHk-=wjxzafG-=J8oT30s7upn4RhBs6TX-uVFZ5rME+L5_DoJA@mail.gmail.com/ [3] Signed-off-by: Kai Wasserbäch Co-developed-by: Thorsten Leemhuis Signed-off-by: Thorsten Leemhuis --- scripts/checkpatch.pl | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index d739ce0909b1..b74d6002f773 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3155,8 +3155,20 @@ sub process { "Co-developed-by and Signed-off-by: name/email do not match \n" . "$here\n" . $rawline . "\n" .$rawlines[$linenr]); } } + +# check if Reported-by: is followed by a Link: + if ($sign_off =~ /^reported(?:|-and-tested)-by:$/i) { + if (!defined $lines[$linenr]) { + WARN("BAD_REPORTED_BY_LINK", + "Reported-by: should be immediately followed by Link: to the report\n" . $herecurr . $rawlines[$linenr] . "\n"); + } elsif ($rawlines[$linenr] !~ m{^link:\s*https?://}i) { + WARN("BAD_REPORTED_BY_LINK", + "Reported-by: should be immediately followed by Link: with a URL to the report\n" . $herecurr . $rawlines[$linenr] . "\n"); + } + } } + # Check Fixes: styles is correct if (!$in_header_lines && $line =~ /^\s*fixes:?\s*(?:commit\s*)?[0-9a-f]{5,}\b/i) { -- 2.39.0