From nobody Mon Feb 9 19:25:33 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 82998C761A6 for ; Thu, 30 Mar 2023 18:13:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230310AbjC3SNx (ORCPT ); Thu, 30 Mar 2023 14:13:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229839AbjC3SNs (ORCPT ); Thu, 30 Mar 2023 14:13:48 -0400 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A94E2E18C for ; Thu, 30 Mar 2023 11:13:46 -0700 (PDT) Received: by mail-wr1-x435.google.com with SMTP id e18so19989944wra.9 for ; Thu, 30 Mar 2023 11:13:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares.net; s=google; t=1680200025; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=ItInTAdnUAKLm+cm48IAJm3RPistuWUxFPvzsYYlPp8=; b=oAoL62t7ERceub5TArLZ0xHe2p0ee4pBYyiAIEOnsb8ui0gahY61b5IZaCieOHj209 Jt8BFb2IIz5n1Q9I1ivzz0o/vULmPNWs9hXFwX0fWsAu+lwjuWxgTwapVPvI3bffYMfW pQ+eneHIxILNbXo7+sRI6WPXcIcsczDyxv7sw9P7+yaD/vlDFrKxfynWWPjPX3ZOW6EQ VQWD1m1VrZ4xTS8GOhlWtJ4TwCYuHe4Gnza6xlRoPu+qmx8nSN81FRD+y1eOjU8b0SE+ c6xsUUWt7QfGDTBIz43ahfu8ssU0xaERzizLu4h5pnclgf5mThDiU5nIlTkMaCx4T6pp UBBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680200025; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ItInTAdnUAKLm+cm48IAJm3RPistuWUxFPvzsYYlPp8=; b=uZqc1iur06YpzYWoLmhnaJrcTsgoi1Ng15RERm8ZP74fa+96oeV+aXqCS0Yd6EKgMJ Ol//DCuf3BK3+MuCkZH5Fum0p7adTo3ySSQWkSOd4w12a/m6byl0b8asLd6AIBMAqDoD YdbL8R5oa2sYSuyPikLXY46upctkvK54SSgUGaUwrKsPzMjnlE5xYn61fcFGgQopHQnk AxyotcLitKJlQWOam3QkwCVeU864EoROzTkB0/sdm4ipA2Lth/vGrh32yGm9o3z9smTx lOp1BuiqRXCn9ObEjkDiNAonEHBzAdHQO5kQDn0/Jeao6rlXvZq1fNx3bjoiKGin1RJI tOqw== X-Gm-Message-State: AAQBX9ekd2WRgkmc93G2XTur+NoC/BcnfBRmZj1FZwLataHy8FGixM6N 9JG9wr1+p/svYv8TWuw7V70RMQ== X-Google-Smtp-Source: AKy350ZlArt1OzD3XguKd9+sKnR9BT4NPMnz/d7pVymlBzEEdHPMWH0ks7bIiqryGmqigP4mzlI03Q== X-Received: by 2002:a5d:68cb:0:b0:2cf:fd6:b83f with SMTP id p11-20020a5d68cb000000b002cf0fd6b83fmr4895020wrw.8.1680200024971; Thu, 30 Mar 2023 11:13:44 -0700 (PDT) Received: from vdi08.nix.tessares.net (static.219.156.76.144.clients.your-server.de. [144.76.156.219]) by smtp.gmail.com with ESMTPSA id e18-20020a056000121200b002d24a188b64sm33459741wrx.112.2023.03.30.11.13.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Mar 2023 11:13:44 -0700 (PDT) From: Matthieu Baerts Date: Thu, 30 Mar 2023 20:13:23 +0200 Subject: [PATCH v3 1/4] docs: process: allow Closes tags with links MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20230314-doc-checkpatch-closes-tag-v3-1-d1bdcf31c71c@tessares.net> References: <20230314-doc-checkpatch-closes-tag-v3-0-d1bdcf31c71c@tessares.net> In-Reply-To: <20230314-doc-checkpatch-closes-tag-v3-0-d1bdcf31c71c@tessares.net> To: Jonathan Corbet , Andy Whitcroft , Joe Perches , Dwaipayan Ray , Lukas Bulwahn , =?utf-8?q?Kai_Wasserb=C3=A4ch?= , Thorsten Leemhuis , 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, Matthieu Baerts X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=6878; i=matthieu.baerts@tessares.net; h=from:subject:message-id; bh=tCxJpCXZj/WPjBCToCpp+PIvuovD/Z8f6431psypKfg=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBkJdFWi0sLZAteAQ7quTCDXY0wVDMKo9SHHZpFH reIJgAmbMqJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZCXRVgAKCRD2t4JPQmmg c7nlD/wI1UTBtopo8m/HSsTHXh/OShmdMF9UeXrWgwgn1Ch24A6x6JUw5L7qcDEJDH9fiZk4z3g CExEzis51ESVDfUaBoIF1F+UN/WjG6Ol8Ntx7Q0w+yTwclRLgR5CKF93jZvS064JKUfMo6kyZkw cXJW4kkM0net/5DicixSKupjHETn6eicuPFMe6/dww51hX+98+9KKZSHs7K0miiLZ7ZvZC+a5FS XfNXGPPvKmd0PIABR7+nLZ2lonL7EHnIseTdU2rN5PR5XpdXLABGsRtPZ/mSuipaQs5TxuJLLAb kbZ4bTkhIZoab5AWF6Vl6R5eLB2qhr61RqO5UmAqg2ck1Jk/fU5GzJM8morO/zlBTSVMQJP+iP/ r6e4Ii9QggrM/rSUnhmEbgSJFMRJJJDQJKGzB6PL1yrG9HZkobh+vivcBtH9CedfLwkGV4o+doo zOxGIPWNIZ3p6HHiw4dh7fQnWwkfTST7aEGMO1d3vkADk9rouoaUw6x9KnTX79H/Yeq67Q24fK2 N1nJjnL0a2R7hFnAqSepLv1F888I4t8YbiboUUZ54X5YGZvdgMBpRnxYg2bzvdXRD7I3XE7vMht OdFJkLe+Pt6f2+0dSv8fw+Ykz4zQH7ZP6s+9QVOs6K4oHMpaXiSnmI/+Rk27rC5ipHdWY52bDs2 wgxUqnuCJN1hJFg== X-Developer-Key: i=matthieu.baerts@tessares.net; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Making sure a bug tracker is up to date is not an easy task. For example, a first version of a patch fixing a tracked issue can be sent a long time after having created the issue. But also, it can take some time to have this patch accepted upstream in its final form. When it is done, someone -- probably not the person who accepted the patch -- has to remember about closing the corresponding issue. This task of closing and tracking the patch can be done automatically by bug trackers like GitLab [1], GitHub [2] and hopefully soon [3] bugzilla.kernel.org when the appropriated tag is used. The two first ones accept multiple tags but it is probably better to pick one. According to commit 76f381bb77a0 ("checkpatch: warn when unknown tags are u= sed for links"), the "Closes" tag seems to have been used in the past by a few people and it is supported by popular bug trackers. Here is how it has been used in the past: $ git log --no-merges --format=3Demail -P --grep=3D'^Closes: http' | \ grep '^Closes: http' | cut -d/ -f3-5 | sort | uniq -c | sort -rn 391 gitlab.freedesktop.org/drm/intel 79 github.com/multipath-tcp/mptcp_net-next 8 gitlab.freedesktop.org/drm/msm 3 gitlab.freedesktop.org/drm/amd 2 gitlab.freedesktop.org/mesa/mesa 1 patchwork.freedesktop.org/series/73320 1 gitlab.freedesktop.org/lima/linux 1 gitlab.freedesktop.org/drm/nouveau 1 github.com/ClangBuiltLinux/linux 1 bugzilla.netfilter.org/show_bug.cgi?id=3D1579 1 bugzilla.netfilter.org/show_bug.cgi?id=3D1543 1 bugzilla.netfilter.org/show_bug.cgi?id=3D1436 1 bugzilla.netfilter.org/show_bug.cgi?id=3D1427 1 bugs.debian.org/625804 Likely here, the "Closes" tag was only properly used with GitLab and GitHub. We can also see that it has been used quite a few times (and still used recently) and this is then not a "random tag that makes no sense" like it was the case with "BugLink" recently [4]. It has also been misused but that was a long time ago, when it was common to use many different random tags. checkpatch.pl script should then stop complaining about this "Closes" tag. As suggested by Thorsten [5], if this tag is accepted, it should first be described in the documentation. This is what is done here in this patch. To avoid confusion, the "Closes" can be used with any public links. No need to check if the underlying bug tracker supports automations. Having this tag with any kind of public bug reports allows bots like regzbot to clearly identify patches fixing a specific bug and avoid false-positives, e.g. patches mentioning it is related to an issue but not fixing it. Note that thanks to this "Closes" tag, the mentioned bug trackers can also locate where a patch has been applied in different branches and repositories. If only the "Link" tag is used, the tracking can also be done but the ticket will not be closed and a manual operation will be needed. Also, these bug trackers have some safeguards: the closure is only done if a commit having the "Closes:" tag is applied in a specific branch. It will then not be closed if a random commit having the same tag is published elsewhere. Also in case of closure, a notification is sent to the owners. Link: https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#d= efault-closing-pattern [1] Link: https://docs.github.com/en/get-started/writing-on-github/working-with= -advanced-formatting/using-keywords-in-issues-and-pull-requests [2] Link: https://lore.kernel.org/linux-doc/20230315181205.f3av7h6owqzzw64p@mee= rkat.local/ [3] Link: https://lore.kernel.org/all/CAHk-=3Dwgs38ZrfPvy=3DnOwVkVzjpM3VFU1zobP= 37Fwd_h9iAD5JQ@mail.gmail.com/ [4] Link: https://lore.kernel.org/all/688cd6cb-90ab-6834-a6f5-97080e39ca8e@leem= huis.info/ [5] Link: https://github.com/multipath-tcp/mptcp_net-next/issues/373 Suggested-by: Thorsten Leemhuis Acked-by: Konstantin Ryabitsev Signed-off-by: Matthieu Baerts --- v3: - Allow using the "Closes" tag with any bug reports, not only the ones supporting automations, useful for regzbot, etc. (Thorsten Leemhuis) v2: - Add Konstantin's Acked-by: even if the patch has changed a bit, the concept is still the same, I hope that's OK. - Mention "public" in "5.Posting.rst" file as well. (Jonathan Corbet) - Re-phrase the new text from "5.Posting.rst". (Bagas Sanjaya & Thorsten Leemhuis) - Clearly mention that private bug trackers and invalid URLs are forbidden (Linus Torvalds). --- Documentation/process/5.Posting.rst | 10 ++++++++++ Documentation/process/submitting-patches.rst | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/Documentation/process/5.Posting.rst b/Documentation/process/5.= Posting.rst index 7a670a075ab6..c755ca795f15 100644 --- a/Documentation/process/5.Posting.rst +++ b/Documentation/process/5.Posting.rst @@ -217,6 +217,16 @@ 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 'Documentation/maintainer/configure-git.rst'. =20 +Similarly, there is also the "Closes:" tag that can be used to mark any +kind of public bug report as closed. For example:: + + Closes: https://example.com/issues/1234 + +Some bug trackers have the ability to close issues automatically when a +commit with such a tag is applied. Some bots monitoring mailing lists can +also track such tags and take certain actions. Private bug trackers and +invalid URLs are forbidden. + A third kind of tag is used to document who was involved in the developmen= t of the patch. Each of these uses this format:: =20 diff --git a/Documentation/process/submitting-patches.rst b/Documentation/p= rocess/submitting-patches.rst index 69ce64e03c70..b0ea03f18bad 100644 --- a/Documentation/process/submitting-patches.rst +++ b/Documentation/process/submitting-patches.rst @@ -134,6 +134,16 @@ resources. In addition to giving a URL to a mailing li= st archive or bug, summarize the relevant points of the discussion that led to the patch as submitted. =20 +It might be interesting to use the 'Closes:' tag to mark any kind of public +bug report as closed. For example:: + + Closes: https://example.com/issues/1234 + +Some bug trackers have the ability to close issues automatically when a +commit with such a tag is applied. Some bots monitoring mailing lists can +also track such tags and take certain actions. Private bug trackers and +invalid URLs are forbidden. + If your patch fixes a bug in a specific commit, e.g. you found an issue us= ing ``git bisect``, please use the 'Fixes:' tag with the first 12 characters of the SHA-1 ID, and the one line summary. Do not split the tag across multi= ple --=20 2.39.2 From nobody Mon Feb 9 19:25:33 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EDB2DC761A6 for ; Thu, 30 Mar 2023 18:13:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230413AbjC3SN5 (ORCPT ); Thu, 30 Mar 2023 14:13:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229862AbjC3SNt (ORCPT ); Thu, 30 Mar 2023 14:13:49 -0400 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DB1FE383 for ; Thu, 30 Mar 2023 11:13:47 -0700 (PDT) Received: by mail-wr1-x42b.google.com with SMTP id j24so20032957wrd.0 for ; Thu, 30 Mar 2023 11:13:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares.net; s=google; t=1680200026; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=xwB7ckwceSp/wZ9DJYR6IF58FZg4kU5wJTyoorWtGWg=; b=lqINACUcUNc6OCM+HRdbgE0wgJ55qku3bVdsQZiOg6rloPtJli0rsUlmCEbguehs/o 8jjo8jAXtUfYcpmcj+ky5OtoB5yEKl5hxoGuOMjIYSfms6NUTQfxkmq/0xaMqpgkDk0U ztyB0jnj+o/D1Yg3Wonx8neuYH8Ow2Lmt21rQw5cYTwwPkUGrNhGUqKazjP8rUyTd9wh v0RifFK7qt/VyoFQJkIi9GM/Nq6LorT2sAWpIDQfgsCT5BIHPx8RhtMePZWqnWVqvhfk 4ZxzvCqn+r1mLKuz/2CeGTL/RXaBu845B3k6Z98u+iaCHEkIbwRHwZxK27AUf5f9vqu3 NDpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680200026; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xwB7ckwceSp/wZ9DJYR6IF58FZg4kU5wJTyoorWtGWg=; b=JY8FirgfegtsVgYhcG1/h0K9ulafnWAY9edqvdx9CAE1h5gXUZ8VTonQ5+9yez8fnj lYPQ4fznhaMUIJxoQpveFeZOlVtWqEScPH07apdPkGvdvOiw4MfW7vr+9f5nqhmXr/dD s7NiYRcMffX1zu1q/HV8ZBQZbiiSRNLbHScBBtrva4JKKFm7OG3LZX8QDYICUIH4NUzx WxIW2YyjRCiT6HHl/aS9FFEx/T0E+quX5uXj30lyMIIjsgTE7Xzw6+KxEeYLDLC+hIK1 KVWYXM2dneARkxJ6XXnllWSl6CMjiliOktMf6KkKu1WM1mAV8VaFbJBTn8p8cU4dA0wV haug== X-Gm-Message-State: AAQBX9fKHShAV0natw+UaBxDpHaUv3Q8NiBsnD7kVLaJL3v/qA+N2c9u MCnDGlxUqEB1V8nn8gVglWw2aQ== X-Google-Smtp-Source: AKy350aY6V8fkNL32GAA39YdUTC+efxlh78Ug+GObvK9mZ+x22X8K8tmhZTYcrymbOke7TatTjrC+Q== X-Received: by 2002:a5d:458f:0:b0:2ce:a703:1937 with SMTP id p15-20020a5d458f000000b002cea7031937mr17963239wrq.50.1680200026030; Thu, 30 Mar 2023 11:13:46 -0700 (PDT) Received: from vdi08.nix.tessares.net (static.219.156.76.144.clients.your-server.de. [144.76.156.219]) by smtp.gmail.com with ESMTPSA id e18-20020a056000121200b002d24a188b64sm33459741wrx.112.2023.03.30.11.13.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Mar 2023 11:13:45 -0700 (PDT) From: Matthieu Baerts Date: Thu, 30 Mar 2023 20:13:24 +0200 Subject: [PATCH v3 2/4] checkpatch: use a list of "link" tags MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20230314-doc-checkpatch-closes-tag-v3-2-d1bdcf31c71c@tessares.net> References: <20230314-doc-checkpatch-closes-tag-v3-0-d1bdcf31c71c@tessares.net> In-Reply-To: <20230314-doc-checkpatch-closes-tag-v3-0-d1bdcf31c71c@tessares.net> To: Jonathan Corbet , Andy Whitcroft , Joe Perches , Dwaipayan Ray , Lukas Bulwahn , =?utf-8?q?Kai_Wasserb=C3=A4ch?= , Thorsten Leemhuis , 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, Matthieu Baerts X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=3619; i=matthieu.baerts@tessares.net; h=from:subject:message-id; bh=szBPPLNcIJlQZP3ZDgAq5KhMDW2VCGhntaAwnGlayqw=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBkJdFWpPuHiuQZcR3cusRyAiveGgQMeQQfJsMSL txyVQQqx2eJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZCXRVgAKCRD2t4JPQmmg c6uhEACB65qdO0Jk6m3WvqJ9FZSniQErwMQIYO77n/4+VWkIceqYibPja1CUPgSNfkdMmDMRL71 /r5zIk0+TuixMynw4tbLQwu+nW0YciH2s1VUww7x7DEkU1bEmL5XbsT38ik9cCZFf9jhJYElhPI 9K6Bx9EMQ63A2+5q/HgaPZxi292pXDQmZjHib1HKv1uCEfEMnccT+1QQOZHOFN1lwYnUv7QK6Wd AKMWrqMzfME717yP6RjHoNtIooFr4DsGH5zP2jahjgH1sx8P/cctI6Iuue1+Ghpg3G+3OSQ3GYC SM1i1oHcbCVgzx2itb5UQoSIGu+wwPcW3twO9pWEOieCudyDW5+IJdrEmN2TS2dsfCY9+XuywKd mqfxCDdeusm2bTorUzGf1f0j5NFWjR/u1qK/bcp+4p2HdbUhXlSNtorEaiY/YFSKRc/IexuRYhA FBQ3CO2Z2f8yEhqPj43NPxURfcC8u81KbzZVIgvy7HlWl/79mVBaaAibyeM9GFUlbRePZuIAt3X eT38ThRYHyLzVikdfZ4u357h9rT2oIELqSAHroL4FsTV1HCFo9uW6itM2/nQZnglldiB4xfT1AC aReqUkfDyaCPgEUDloo0sCGjRR6g92eo3cve/+go0VPDs7vs0T8q3lFeVMBj8XbAMrMLvq/z1vY LzRVsODSaL/matA== X-Developer-Key: i=matthieu.baerts@tessares.net; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit will allow the use of a similar "link" tag. Because there is a possibility that other similar tags will be added in the future and to reduce the number of places where the code will be modified to allow this new tag, a list with all these "link" tags is now used. Two variables are created from it: one to search for such tags and one to print all tags in a warning message. Suggested-by: Joe Perches Signed-off-by: Matthieu Baerts --- scripts/checkpatch.pl | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index bd44d12965c9..9d092ff4fc16 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -620,6 +620,22 @@ our $signature_tags =3D qr{(?xi: Cc: )}; =20 +our @link_tags =3D qw(Link); + +#Create a search and print patterns for all these strings to be used direc= tly below +our $link_tags_search =3D ""; +our $link_tags_print =3D ""; +foreach my $entry (@link_tags) { + if ($link_tags_search ne "") { + $link_tags_search .=3D '|'; + $link_tags_print .=3D ' or '; + } + $entry .=3D ':'; + $link_tags_search .=3D $entry; + $link_tags_print .=3D "'$entry'"; +} +$link_tags_search =3D "(?:${link_tags_search})"; + our $tracing_logging_tags =3D qr{(?xi: [=3D-]*> | <[=3D-]* | @@ -3158,14 +3174,14 @@ sub process { } } =20 -# check if Reported-by: is followed by a Link: +# check if Reported-by: is followed by a link tag if ($sign_off =3D~ /^reported(?:|-and-tested)-by:$/i) { if (!defined $lines[$linenr]) { WARN("BAD_REPORTED_BY_LINK", - "Reported-by: should be immediately followed by Link: to the rep= ort\n" . $herecurr . $rawlines[$linenr] . "\n"); - } elsif ($rawlines[$linenr] !~ m{^link:\s*https?://}i) { + "Reported-by: should be immediately followed by $link_tags_print= to the report\n" . $herecurr . $rawlines[$linenr] . "\n"); + } elsif ($rawlines[$linenr] !~ m{^$link_tags_search\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 $link_tags_print= with a URL to the report\n" . $herecurr . $rawlines[$linenr] . "\n"); } } } @@ -3250,8 +3266,8 @@ sub process { # file delta changes $line =3D~ /^\s*(?:[\w\.\-\+]*\/)++[\w\.\-\+]+:/ || # filename then : - $line =3D~ /^\s*(?:Fixes:|Link:|$signature_tags)/i || - # A Fixes: or Link: line or signature tag line + $line =3D~ /^\s*(?:Fixes:|$link_tags_search|$signature_tags)/i || + # A Fixes:, link or signature tag line $commit_log_possible_stack_dump)) { WARN("COMMIT_LOG_LONG_LINE", "Possible unwrapped commit description (prefer a maximum 75 chars = per line)\n" . $herecurr); @@ -3266,13 +3282,13 @@ sub process { =20 # Check for odd tags before a URI/URL if ($in_commit_log && - $line =3D~ /^\s*(\w+):\s*http/ && $1 ne 'Link') { + $line =3D~ /^\s*(\w+:)\s*http/ && $1 !~ /^$link_tags_search$/) { if ($1 =3D~ /^v(?:ersion)?\d+/i) { WARN("COMMIT_LOG_VERSIONING", "Patch version information should be after the --- line\n" . $her= ecurr); } else { WARN("COMMIT_LOG_USE_LINK", - "Unknown link reference '$1:', use 'Link:' instead\n" . $herecurr= ); + "Unknown link reference '$1', use $link_tags_print instead\n" . $= herecurr); } } =20 --=20 2.39.2 From nobody Mon Feb 9 19:25:33 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29AFFC6FD1D for ; Thu, 30 Mar 2023 18:14:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230432AbjC3SOB (ORCPT ); Thu, 30 Mar 2023 14:14:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229916AbjC3SNt (ORCPT ); Thu, 30 Mar 2023 14:13:49 -0400 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D000D516 for ; Thu, 30 Mar 2023 11:13:48 -0700 (PDT) Received: by mail-wr1-x42c.google.com with SMTP id y14so20003009wrq.4 for ; Thu, 30 Mar 2023 11:13:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares.net; s=google; t=1680200027; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=kWvu93s3B9VjmqDMiiXdedDGk5MrX3CFDculOGxbOWA=; b=sli5Zcnh9i3zNFg0OD4NJPjzj5UPngZ7yeiqMMUves6L/8ZJDHVNC3ONaZ0AIC5yTQ QPj6iYADmhwpApfEAzvdNjYd2EusisdpRaAUcu59P0Hmt6hV76sU2XaBlk9e/ZQqDa3o 9Blb/mtUqXj12HRbpXYfuM9xIjrpZP8IcSjfV1pAcqGNjBTp5jxqJdU2R8MdycMnWRY7 tH+KHrdlazlSAzTx2p2hgMOAOFMAZJIxesKhkQpBqmZx5kB380/W2iFcH1EFauzVNA98 wxewA9SGDs0AxubFXATsh0YzLUsHTtS08CB3oq4pTm/vPZLaoGMM6ASZV/utCcpaYZkP i9Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680200027; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kWvu93s3B9VjmqDMiiXdedDGk5MrX3CFDculOGxbOWA=; b=4jBh90xLCJCx/GZYAZewaMBBj48uJcsNazdfqaGrLkhv06/1iNHp41Al7ISiaT3MLC 89yfuOM2rY4arqyZnZTXaicVF+ugSe5SKfeJGAQBVtvuGJQSHO8/vzny9iMSozAxyQK5 6k4rKFJNCQfQrgjQPCGLxX9TQJaqXpY3epu4NwZ+25kNEaN3FrCAazKYd/9LGgkn53Jq GCWyHZFAMQLoiFGdPv8YWMI7kHbSeoH6Ra3LwmxMuEMchsNA79W3E3vNhNQ47hekBtt0 n5NnweN3s07HzWDb5VTnTOmBs+a2QR1ct2RiowfJGJVV7iBVbYJFGLT5xu8zn4b+f3dr qrsg== X-Gm-Message-State: AAQBX9cCPfwZ7VDSA69cFPV69Z8A6LK7i6qD30XGy4L2zeHVfGSS03BF np/kU27AizMdkF8KSyEM9t2shg== X-Google-Smtp-Source: AKy350ZWc8tsaoQuJAI+JCJF8FIO6JAnNbN0LzQ0c1I4PsoO/4NA4M+PeruUOstds4qYABCZ9NPt5A== X-Received: by 2002:adf:fc8e:0:b0:2d5:39d:514f with SMTP id g14-20020adffc8e000000b002d5039d514fmr19572798wrr.65.1680200027085; Thu, 30 Mar 2023 11:13:47 -0700 (PDT) Received: from vdi08.nix.tessares.net (static.219.156.76.144.clients.your-server.de. [144.76.156.219]) by smtp.gmail.com with ESMTPSA id e18-20020a056000121200b002d24a188b64sm33459741wrx.112.2023.03.30.11.13.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Mar 2023 11:13:46 -0700 (PDT) From: Matthieu Baerts Date: Thu, 30 Mar 2023 20:13:25 +0200 Subject: [PATCH v3 3/4] checkpatch: allow Closes tags with links MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20230314-doc-checkpatch-closes-tag-v3-3-d1bdcf31c71c@tessares.net> References: <20230314-doc-checkpatch-closes-tag-v3-0-d1bdcf31c71c@tessares.net> In-Reply-To: <20230314-doc-checkpatch-closes-tag-v3-0-d1bdcf31c71c@tessares.net> To: Jonathan Corbet , Andy Whitcroft , Joe Perches , Dwaipayan Ray , Lukas Bulwahn , =?utf-8?q?Kai_Wasserb=C3=A4ch?= , Thorsten Leemhuis , 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, Matthieu Baerts X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1288; i=matthieu.baerts@tessares.net; h=from:subject:message-id; bh=D3yoDenjNEV/KCtG0U0EPfT8PJhrudmfXIcKaZcGmXw=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBkJdFWQocAajiRNqyFvXj5qo4/2Z8WWqi1nIZBk 5QwkcAZ+n+JAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZCXRVgAKCRD2t4JPQmmg c9SgEACJgEzspH+uZoG/13hgM9PKxSlrJyloUsc7rMZyyotfkMCSrhRetdU39HLP0ov13RMhD7x HyTbtXG6yJcsIyrNO7E1sjh/VsWLuSRUNc88IRngD4gPFXZ9dYSOxP8xhg8vSW59EmXi4eHVEW9 FvharwxCLiaMfgbpEn6oKbgTv+5f9O5jJZ8In6M1fGvK8FPXd1AZc8fIrIQrGumKSK+SxUDP4z6 8+cx1flxxcXVJHy63snCsalNGkWNj03Fea9dLRaGGQn5YcWjeUcO5wr9JMNLsb9ab6alLGgWzwr yvf2tPBVjV3FMEWfYBRqDEhYtXdL857Nzu9ZXX1c+KRDrmYoKNHoNUdL5E1G+g7ZIruYEBAr4b5 wzd+dkxAR30b0v8xbsdJ7VcTwppgqA5j67MJZbNMstx9fGZMSuTKIQE23VZc28fJHfhTX/fJTwT Uw9lMq4duCsQHUKbEby1KjZz2xZRCvw5khoin0vCsBG1kB5CG3tMzD2WtUT9l7/4lZ0pNxBiFv7 DU3Fn4vpAPDBC5RZTS0Gu17bcoLNkKFlMTE6J/c96yTIKjQL7Q5JLlWzJ/uM7PTIrP+tHpzS9pU Ybx1BImfE7gTrV3hC08Kw/i6FBHVhwbtPLTF8tkzi2fCIFgjwGCcW6uqBVX3Y1Lpj3SAZe0MC+G 7ASkSErSjwx7pPw== X-Developer-Key: i=matthieu.baerts@tessares.net; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As a follow-up of a previous patch modifying the documentation to allow using the "Closes:" tag, checkpatch.pl is updated accordingly. checkpatch.pl now no longer complain when the "Closes:" tag is used by itself or after the "Reported-by:" tag. Fixes: 76f381bb77a0 ("checkpatch: warn when unknown tags are used for links= ") Fixes: d7f1d71e5ef6 ("checkpatch: warn when Reported-by: is not followed by= Link:") Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/373 Signed-off-by: Matthieu Baerts --- v3: - split into 2 patches: the previous one adds a list with all the "link" tags. This one only allows the "Closes" tag. (Joe Perches) - "Closes" is no longer printed between parenthesis. (Thorsten Leemhuis) --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 9d092ff4fc16..ca58c734ff22 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -620,7 +620,7 @@ our $signature_tags =3D qr{(?xi: Cc: )}; =20 -our @link_tags =3D qw(Link); +our @link_tags =3D qw(Link Closes); =20 #Create a search and print patterns for all these strings to be used direc= tly below our $link_tags_search =3D ""; --=20 2.39.2 From nobody Mon Feb 9 19:25:33 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 49D2CC77B60 for ; Thu, 30 Mar 2023 18:14:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230314AbjC3SOF (ORCPT ); Thu, 30 Mar 2023 14:14:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229973AbjC3SNv (ORCPT ); Thu, 30 Mar 2023 14:13:51 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B76E1DBE2 for ; Thu, 30 Mar 2023 11:13:49 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id l12so19969763wrm.10 for ; Thu, 30 Mar 2023 11:13:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares.net; s=google; t=1680200028; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=2pcuoehiPvGyehUI4bF839lUv51fj3SAdGORffoe55w=; b=AL19jyQDpXSIL97ebF8N6roZDjqqZ58JaDJ+a22kaBzvp0UeYTNwsP3ZrjU8naMj0V PyfbKCnH4RN7ZGwsCHfoAL5WmWlRu2w5imZcn4+H8inw9ZdoNpx2Xlx8fHwauzBjpAtO zsZog50xCUpJxXr9uq4YLZUXyFADB62kXqUbAx4glHPggEt9w9bGroTD4RgRX6a9mArR fbyPr6Z4gm6CNzpCP/lcbyxcMqqC2E/3xCYCXOLwWrLRt8KkvWqZ6awi5ySj+ZwKj5Qs WjXHFdJfcuVd3M36W8Lh0WsERMEAKn6lNkMcWIuI5aW6i92vpAMswIkcEUI+ymPFfU9h BapQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680200028; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2pcuoehiPvGyehUI4bF839lUv51fj3SAdGORffoe55w=; b=usDT2/VsZiMmKYoRkGW0DyOsoI0NJIoPdh0a4KuZ7xirI00opKv5ksQGpSjdxR72d5 o7BV0lIWUCoC6ODC7ciRFFOEVvgSYpKuuc3iEDExiSAxkdEmrju4wAzMbZNQNqQkJLIO dmBl5IAqpTlNXfdR0inrb0yaTMY3WZ9OyF875czywA/NBF8e1gY+t0DCohgN25K8ETcE T1y6I09tIpD1o+/LHoTNfvu3hA2nYGQLlRQt4YR736Z1As8/eVegvHMOvuvA9mnT7B0L vSF2AJm6Mu9KzJVs+h0tcJEu1JtK/l3eGtARo9O4CBQ95qjwCzgJ365/bU/LCx/B/gLR 5BfA== X-Gm-Message-State: AAQBX9eW7CqWUNUH5G35QvexaIaw55YUop7TIQlRkMkvLtWxk/nkB5pW 7LZv95kLNBKonoR6Z77kkvkwAQ== X-Google-Smtp-Source: AKy350YzU7wPKjANBCuoa0d1SuYlj3kkszREhmdvT7pjdImaboEpN1UAurUNdi2TP/Voo5hlSVe9wQ== X-Received: by 2002:adf:cc8f:0:b0:2d8:cacd:797e with SMTP id p15-20020adfcc8f000000b002d8cacd797emr19190788wrj.10.1680200028130; Thu, 30 Mar 2023 11:13:48 -0700 (PDT) Received: from vdi08.nix.tessares.net (static.219.156.76.144.clients.your-server.de. [144.76.156.219]) by smtp.gmail.com with ESMTPSA id e18-20020a056000121200b002d24a188b64sm33459741wrx.112.2023.03.30.11.13.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Mar 2023 11:13:47 -0700 (PDT) From: Matthieu Baerts Date: Thu, 30 Mar 2023 20:13:26 +0200 Subject: [PATCH v3 4/4] checkpatch: check for misuse of the link tags MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20230314-doc-checkpatch-closes-tag-v3-4-d1bdcf31c71c@tessares.net> References: <20230314-doc-checkpatch-closes-tag-v3-0-d1bdcf31c71c@tessares.net> In-Reply-To: <20230314-doc-checkpatch-closes-tag-v3-0-d1bdcf31c71c@tessares.net> To: Jonathan Corbet , Andy Whitcroft , Joe Perches , Dwaipayan Ray , Lukas Bulwahn , =?utf-8?q?Kai_Wasserb=C3=A4ch?= , Thorsten Leemhuis , 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, Matthieu Baerts X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1260; i=matthieu.baerts@tessares.net; h=from:subject:message-id; bh=4mEcP5uVl3gASvU4Xov+GjgFA2y/DSnWoQCQNXocbFA=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBkJdFWAiRwpGTmZ3UksCrrvVVsadaDQyEH6ttlf xxeioGUWaiJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZCXRVgAKCRD2t4JPQmmg c+FYD/0QL8eSGtX66aGfn4VRo4nKjkBYeiz17dcwDxp+NOHSIrjUHDK2Qeq8pz+BpJIrV67/bNJ 8MhzhaNILYp+AjzLuRkW84TbGMi7o7LdOiLYZxo/Ija+64oRf4vvmftrxrUJwu8uAy947w1yvHk x0bmZIsBKQ+9hgXQ6wWuYYPbeyQwPp2FSyzO6N/OQr/0aSgs47n2IY02IU6QsDi3e2lzdIMIFI2 W2LXk4KVDgiXD1Veoza94/lVWLw/uYSa2C1lZhm1pqTNOadKwrgtedxsgaK1rN901KhsA5fKnkt HMMfbu72dNEp9LCBO72pHW99u0ejQrk96QzZF045hPU0MRR5oZ/sKdol+NKmLvIQDAFsaU1eHxB xHeXPSfskzfbSmNCfu2iXbH5Xrn7+qcXmL1LlDm5hsGye9N6cKGqtg6/6Ri6+ydi103F2QohLyT HVZA/QymXSExliDxXnHo8nYS1eQGXMwIgrJI93/qUtmoKqQyqqPtmdI/EfW1K13d/dg3Y0NwqA7 lZoqqRjZR8/TtAUbRagTAYdQc4gQrsMwTDgr8aRtKKunFHJJN64Jj0L1QdPo+3YY35qpGXdpdy1 hBzhevHe0CZPzD/KQL3v/RkD+Bw90Sh+fblGKQFOQYlO9n3Gsq4EG00rbtlgzf45L33chHqdYOj fIHOulDCJF2UKCQ== X-Developer-Key: i=matthieu.baerts@tessares.net; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org "Link:" and "Closes:" tags have to be used with public URLs. It is difficult to make sure the link is public but at least we can verify the tag is followed by 'http(s):'. With that, we avoid such a tag that is not allowed [1]: Closes: Link: https://lore.kernel.org/linux-doc/CAHk-=3Dwh0v1EeDV3v8TzK81nDC40=3DXu= TdY2MCr0xy3m3FiBV3+Q@mail.gmail.com/ [1] Signed-off-by: Matthieu Baerts --- v3: - new patch addressing Linus' concerns. --- scripts/checkpatch.pl | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index ca58c734ff22..e3cafd2cb77a 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3292,6 +3292,17 @@ sub process { } } =20 +# Check for misuse of the link tags + if ($in_commit_log && + $line =3D~ /^\s*(\w+:)\s*(\S+)/) { + my $tag =3D $1; + my $value =3D $2; + if ($tag =3D~ /^$link_tags_search$/ && $value !~ /^https?:/) { + WARN("COMMIT_LOG_WRONG_LINK", + "'$tag' should be followed by a public http(s) link\n" . $herecur= r); + } + } + # Check for lines starting with a # if ($in_commit_log && $line =3D~ /^#/) { if (WARN("COMMIT_COMMENT_SYMBOL", --=20 2.39.2