From nobody Wed Apr 8 12:49:17 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 9F350C54EE9 for ; Wed, 7 Sep 2022 12:36:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229583AbiIGMgS (ORCPT ); Wed, 7 Sep 2022 08:36:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229507AbiIGMgO (ORCPT ); Wed, 7 Sep 2022 08:36:14 -0400 Received: from smtp-bc0b.mail.infomaniak.ch (smtp-bc0b.mail.infomaniak.ch [IPv6:2001:1600:3:17::bc0b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FCDFB275A for ; Wed, 7 Sep 2022 05:36:11 -0700 (PDT) Received: from smtp-2-0000.mail.infomaniak.ch (unknown [10.5.36.107]) by smtp-2-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4MN1vY0cMMzMqC35; Wed, 7 Sep 2022 14:36:09 +0200 (CEST) Received: from philippe-pc.toradex.int (unknown [31.10.206.125]) by smtp-2-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 4MN1vW6p3PzMppZ3; Wed, 7 Sep 2022 14:36:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=pschenker.ch; s=20220412; t=1662554169; bh=OfaoBsKpDFqckHovf40Gpkkxx6wVziWuBLb6theEUt8=; h=From:To:Cc:Subject:Date:From; b=utss6XnT4z+9MgncvQF1+6lz1TxlJrihhFkYVlAH/AqGLtYM7f/grafmdYOwFgXkk BoRBAF8p3iCUX4/iRqM+G8kCXoWG3xnF9+gFzILsUzTVwJmpb+QZVQNZwSJZWq8RTP CtkqdsvZ/kab/m5H0pCPKseTFEricBwCzwT6lcdw= From: Philippe Schenker To: Andy Whitcroft , Joe Perches , linux-kernel@vger.kernel.org Cc: Stephen Rothwell , Dwaipayan Ray , Lukas Bulwahn , Shawn Guo , Philippe Schenker Subject: [PATCH] checkpatch: add check for fixes: tag Date: Wed, 7 Sep 2022 14:35:47 +0200 Message-Id: <20220907123547.138646-1-dev@pschenker.ch> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Philippe Schenker The page about submitting patches in Documentation/process/submitting-patches.rst is very specific on how that tag should be formatted: 'Fixes: <12+ chars of sha1> (\"\")' Add a rule that warns if this format does not match. This commit is introduced as in the past commits have been sent multiple times with having the word commit also in the Fixes: tag which had to be corrected by the maintainers. [1] [1] https://lore.kernel.org/all/20220906073746.1f2713f7@canb.auug.org.au/ Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com> --- scripts/checkpatch.pl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 79e759aac543..0d7ce0c3801a 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3438,6 +3438,13 @@ sub process { } } =20 +# Check fixes tag format + if ($in_commit_log && ($line =3D~ /^\s*Fixes:/i) && + !($line =3D~ /^\s*Fixes:\s[0-9a-f]{12,40}\s\(\".*\"\)/)) { + WARN("FIXES_TAG_FORMAT", + "Possible wrong format on Fixes: tag, please use format Fixes: <12= + chars of sha1> (\"<title line>\")\n" . $herecurr); + } + # ignore non-hunk lines and lines being removed next if (!$hunk_line || $line =3D~ /^-/); =20 --=20 2.37.2