Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp817331rwl; Fri, 31 Mar 2023 02:52:34 -0700 (PDT) X-Google-Smtp-Source: AKy350Z7NDzqSvws/NWa5+YS/2KyAFsPB7mj3wJ8I5rtGt59F6y4it9JSxv9nDS5E/ws7QX6fcB2 X-Received: by 2002:a17:906:207:b0:933:23c4:820b with SMTP id 7-20020a170906020700b0093323c4820bmr4319707ejd.4.1680256354129; Fri, 31 Mar 2023 02:52:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680256354; cv=none; d=google.com; s=arc-20160816; b=Gc5N2DA9/RHIyHNQz1Yx6iQ90y6/zzJEnde4sArt7vOPtjbGtgPhP+Layt6+yj+C6D +3X6oIthGX747RZ9tGdi6QAxI4YdhSio8Nwx60HXHsbVWciGaW3nEKyt9A3mtJ8OTZER p9WmLw/En2ji2zdO0/BKmwOeGa7gkoTajxIvy5+EDzS9qOWuRKNLg345YU+qHgi1JKxC zBATcHoW00UzLROCUgu3vqBFpphVVm3oHxSJFKCHp40ysH18qQ6CVFPwgkv7UgrVCjpq cuK75O0lWWmzuKuZM4Dqus6+ZhwUScvIdKHE5TdrZk0e6fMvGQ/iklmQLluIu+oIZR3Z y3jQ== 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=L59WOmIq8sNSt6vHWeNXfyeL4D4JwlDT9DA8E/ARYaU=; b=mMdcN432cuTaqigpNWQFA7zRD8ub5inTc6HNjx+dZS+O0fkwI+tyGN2T/y2yHQhdbg LL62nq/WRZp+xIAGK38ZUWGAoHjIQm/1/MoMEUq3bb5uqb313wUy6NHY6zruGJJ4Hafm TXiD1uslCIWpW3TzpFMNfgXJxzdNBMIBftXngzvddKgH7l20LYFVxfk5PBudE6sqC+2+ Og3miSID6Jmzm/aGg3/Wvym0ZtXQfOGE1v5NBuxZMrZnGN50gKXIca+ZmpI/FetvhRfS it8F72TSQU84obh1PJ2gP9qW62qFQSPvjUsM2sXrFYm59ITjgjFZosL7asGUx8IIhLKi elEA== 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 ul6-20020a170907ca8600b00947b7ce543fsi909467ejc.794.2023.03.31.02.52.09; Fri, 31 Mar 2023 02:52:34 -0700 (PDT) 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 S231631AbjCaJjy (ORCPT + 99 others); Fri, 31 Mar 2023 05:39:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232202AbjCaJjk (ORCPT ); Fri, 31 Mar 2023 05:39:40 -0400 Received: from wp530.webpack.hosteurope.de (wp530.webpack.hosteurope.de [80.237.130.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 664881EA28; Fri, 31 Mar 2023 02:39:28 -0700 (PDT) Received: from [2a02:8108:8980:2478:8cde:aa2c:f324:937e]; authenticated by wp530.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) id 1piBEB-00075I-BA; Fri, 31 Mar 2023 11:39:23 +0200 Message-ID: <2194d19d-f195-1a1e-41fc-7827ae569351@leemhuis.info> Date: Fri, 31 Mar 2023 11:39:22 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Content-Language: en-US, de-DE To: Matthieu Baerts , Jonathan Corbet , Andy Whitcroft , Joe Perches , Dwaipayan Ray , Lukas Bulwahn , =?UTF-8?Q?Kai_Wasserb=c3=a4ch?= , Andrew Morton , David Airlie , Daniel Vetter , Konstantin Ryabitsev , Bagas Sanjaya , Linus Torvalds Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, mptcp@lists.linux.dev References: <20230314-doc-checkpatch-closes-tag-v3-0-d1bdcf31c71c@tessares.net> From: Thorsten Leemhuis Subject: Re: [PATCH v3 0/4] docs & checkpatch: allow Closes tags with links In-Reply-To: <20230314-doc-checkpatch-closes-tag-v3-0-d1bdcf31c71c@tessares.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-bounce-key: webpack.hosteurope.de;linux@leemhuis.info;1680255568;04a097a5; X-HE-SMSGID: 1piBEB-00075I-BA X-Spam-Status: No, score=-0.0 required=5.0 tests=NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 30.03.23 20:13, Matthieu Baerts wrote: > Since v6.3, checkpatch.pl now complains about the use of "Closes:" tags > followed by a link [1]. It also complains if a "Reported-by:" tag is > followed by a "Closes:" one [2]. > > As detailed in the first patch, this "Closes:" tag is used for a bit of > time, mainly by DRM and MPTCP subsystems. It is used by some bug > trackers to automate the closure of issues when a patch is accepted. > It is even planned to use this tag with bugzilla.kernel.org [3]. > > The first patch updates the documentation to explain what is this > "Closes:" tag and how/when to use it. The second patch modifies > checkpatch.pl to stop complaining about it. > > The DRM maintainers and their mailing list have been added in Cc as they > are probably interested by these two patches as well. > > [1] https://lore.kernel.org/all/3b036087d80b8c0e07a46a1dbaaf4ad0d018f8d5.1674217480.git.linux@leemhuis.info/ > [2] https://lore.kernel.org/all/bb5dfd55ea2026303ab2296f4a6df3da7dd64006.1674217480.git.linux@leemhuis.info/ > [3] https://lore.kernel.org/linux-doc/20230315181205.f3av7h6owqzzw64p@meerkat.local/ > > Signed-off-by: Matthieu Baerts Maybe it's just me, but I think those changes do not make it clear enough when to use Link: and when to use Closes. Find below an alternative proposal how I'd do it for consideration that goes 'all-in' for the sake of simplicity. [untested -- and I hope thunderbird won't mangle the patch] Ciao, Thorsten diff --git a/Documentation/process/5.Posting.rst b/Documentation/process/5.Posting.rst index 7a670a075ab6..fc194b4d1674 100644 --- a/Documentation/process/5.Posting.rst +++ b/Documentation/process/5.Posting.rst @@ -207,11 +207,17 @@ the patch:: Fixes: 1f2e3d4c5b6a ("The first line of the commit specified by the first 12 characters of its SHA-1 ID") Another tag is used for linking web pages with additional backgrounds or -details, for example a report about a bug fixed by the patch or a document +details, for example earlier discussion which lead to the patch or a document with a specification implemented by the patch:: Link: https://example.com/somewhere.html optional-other-stuff +If the URL points to a report about a bug fixed by the patch, use this instead:: + + Closes: https://example.com/somewhere.html optional-other-stuff + +Ensure any such links are publicly accessible. + Many maintainers when applying a patch also add this tag to link to the latest public review posting of the patch; often this is automatically done by tools like b4 or a git hook like the one described in @@ -251,7 +257,7 @@ The tags in common use are: - Reported-by: names a user who reported a problem which is fixed by this patch; this tag is used to give credit to the (often underappreciated) people who test our code and let us know when things do not work - correctly. Note, this tag should be followed by a Link: tag pointing to the + correctly. Note, this tag should be followed by a Closes: tag pointing to the report, unless the report is not available on the web. - Cc: the named person received a copy of the patch and had the diff --git a/Documentation/process/submitting-patches.rst b/Documentation/process/submitting-patches.rst index 69ce64e03c70..73611cf1c372 100644 --- a/Documentation/process/submitting-patches.rst +++ b/Documentation/process/submitting-patches.rst @@ -126,8 +126,10 @@ For example:: Link: https://lore.kernel.org/r/30th.anniversary.repost@klaava.Helsinki.FI/ -Please check the link to make sure that it is actually working and points -to the relevant message. +If the URL points to a bug report that is fixed by the patch, use 'Closes:' +instead. + +Ensure any such links are publicly accessible. However, try to make your explanation understandable without external resources. In addition to giving a URL to a mailing list archive or bug, @@ -498,7 +500,7 @@ Using Reported-by:, Tested-by:, Reviewed-by:, Suggested-by: and Fixes: The Reported-by tag gives credit to people who find bugs and report them and it hopefully inspires them to help us again in the future. The tag is intended for bugs; please do not use it to credit feature requests. The tag should be -followed by a Link: tag pointing to the report, unless the report is not +followed by a Closes: tag pointing to the report, unless the report is not available on the web. Please note that if the bug was reported in private, then ask for permission first before using the Reported-by tag. diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index bd44d12965c9..f9a7c2b856ae 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3158,14 +3158,14 @@ sub process { } } -# check if Reported-by: is followed by a Link: +# check if Reported-by: is followed by a Closes: tag 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) { + "Reported-by: should be immediately followed by Closes: to the report\n" . $herecurr . $rawlines[$linenr] . "\n"); + } elsif ($rawlines[$linenr] !~ m{^closes:\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"); + "Reported-by: should be immediately followed by Closes: with a URL to the report\n" . $herecurr . $rawlines[$linenr] . "\n"); } } } @@ -3266,13 +3266,13 @@ sub process { # Check for odd tags before a URI/URL if ($in_commit_log && - $line =~ /^\s*(\w+):\s*http/ && $1 ne 'Link') { + $line =~ /^\s*(\w+):\s*http/ && $1 ne 'Link' && $1 ne 'Closes') { if ($1 =~ /^v(?:ersion)?\d+/i) { WARN("COMMIT_LOG_VERSIONING", "Patch version information should be after the --- line\n" . $herecurr); } else { WARN("COMMIT_LOG_USE_LINK", - "Unknown link reference '$1:', use 'Link:' instead\n" . $herecurr); + "Unknown link reference '$1:', use 'Link:' or 'Closes:' instead\n" . $herecurr); } }