From nobody Thu Dec 18 09:59:09 2025 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7B4B01D0E28 for ; Mon, 13 Jan 2025 22:22:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736806923; cv=none; b=jqPDGWYi5Z7CO7yiuTh5TmvwVmSBO2hrCbMUqsJHU0yhpr2KZaoRLwRT0fbUWXXoDIDUr3xusZcUfLMht3UXoeFLe8prgEguJPuwvKFIT3Wb6szA3TKTfLIlzz6Z2BAxXDqFx5/IWStn6nw2WH+Icg5AA2lOEOimJBJB8U9e0Eg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736806923; c=relaxed/simple; bh=/QsU2XqHBl8PEdY40oYZINBZgPjkMsTpWRQX9NikfW4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=H5MCdv7KIyu2js/k/6/bi1B+iT4Hig3mPpuhL8t0ED8/lV5/G7X+/SqKgYXQpAtA/hjsH5tRVA6Ke21xgnI3jGSGxT1kbN3Bq0gUrrYhNMJwKg7nnyZhVAZL8m3Lx8Je7JLAFaxXe+PZuFjZYvxev9y/T4CLQSysoimwgMoN9UQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tXSoq-0006MM-Nk; Mon, 13 Jan 2025 23:22:00 +0100 Received: from dude05.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::54]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tXSoq-000KZ6-06; Mon, 13 Jan 2025 23:22:00 +0100 Received: from localhost ([::1] helo=dude05.red.stw.pengutronix.de) by dude05.red.stw.pengutronix.de with esmtp (Exim 4.96) (envelope-from ) id 1tXSor-008pm5-0f; Mon, 13 Jan 2025 23:22:00 +0100 From: Ahmad Fatoum Date: Mon, 13 Jan 2025 23:21:58 +0100 Subject: [PATCH] checkpatch: don't warn about long lines with footnote links Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250113-footnote-links-v1-1-3e9b6196d478@pengutronix.de> X-B4-Tracking: v=1; b=H4sIAAWShWcC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDI1MDQ0Nj3bT8/JK8/JJU3ZzMvOxi3cTkpBSTFINUUxNjSyWgpoKi1LTMCrC B0bG1tQAYXy8qYAAAAA== X-Change-ID: 20250113-footnote-links-acbd4d0e5439 To: Andy Whitcroft , Joe Perches , Dwaipayan Ray , Lukas Bulwahn Cc: linux-kernel@vger.kernel.org, kernel@pengutronix.de, Ahmad Fatoum X-Mailer: b4 0.14.2 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: a.fatoum@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org checkpatch will warn[0] about lines like the first footnote below, but breaking into multiple lines is not an option if the footnote is just a URL. While there's already an exception for Link: tags and some commit messages add a footnote after it[1], the result is more noisy and harder to follow when mixed with non-URL footnotes, so explicit support for footnotes-prefixed URLs makes sense. [0]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tre= e/scripts/checkpatch.pl#n3289 [1]: Commit 6612ac8c625c ("lib/list_sort: clarify comparison function requirements in list_sort()") Signed-off-by: Ahmad Fatoum --- scripts/checkpatch.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 7b28ad3317427a6bf9e27b77065aa3915cb13053..febc05c381856361120c02b9b52= 694cc6fa95302 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -642,6 +642,8 @@ foreach my $entry (@link_tags) { } $link_tags_search =3D "(?:${link_tags_search})"; =20 +our $link_footnote =3D "(?:\\[\\d\\]: https?://)"; + our $tracing_logging_tags =3D qr{(?xi: [=3D-]*> | <[=3D-]* | @@ -3272,8 +3274,8 @@ sub process { # file delta changes $line =3D~ /^\s*(?:[\w\.\-\+]*\/)++[\w\.\-\+]+:/ || # filename then : - $line =3D~ /^\s*(?:Fixes:|$link_tags_search|$signature_tags)/i || - # A Fixes:, link or signature tag line + $line =3D~ /^\s*(?:Fixes:|$link_tags_search|$signature_tags|$link_= footnote)/i || + # A Fixes:, link, footnote or signature tag line $commit_log_possible_stack_dump)) { WARN("COMMIT_LOG_LONG_LINE", "Prefer a maximum 75 chars per line (possible unwrapped commit des= cription?)\n" . $herecurr); --- base-commit: 37136bf5c3a6f6b686d74f41837a6406bec6b7bc change-id: 20250113-footnote-links-acbd4d0e5439 Best regards, --=20 Ahmad Fatoum