From nobody Tue Jun 16 14:53:59 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 5E4A31A08AF for ; Thu, 30 Apr 2026 22:53:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777589586; cv=none; b=K+6mNv9hza+yiE4Y/w7Y6bVeBeDgDHaHBNG3lqYSFT63KW89TwplCrzFVhU9gJ8Xu/zKQKwA3B9Dllf7OFMZFYNoAxdqkP3nOUu2JwDC5moXdAMKMvZdRH2ojazN3hPOLXXwwDWfV5w7L0ecVWIItuWFGQJHxxhQsbrCggxzOnY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777589586; c=relaxed/simple; bh=bAi7Z9r7FKLTc0oPcxRXICFMDGTXiNN4gp19fbSt230=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=mEBkVqDV+GKkoqmQJkk0+iHw3eDdRTzEOIKfx9023165zWWiQ1srQnF+qDCnN4eIk63ZD4LSo7okXsvD+EcwP7wAM6f4g1SQl2Kmd3i/TD8QmX7k9XQSgIIdaXU1xF8AQCJzRs+uM7hvrtFRc8eALn9S2KEP5hJl6vGqOOzZ43A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FGmIx/zp; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FGmIx/zp" Received: by smtp.kernel.org (Postfix) with ESMTPS id 0577BC2BCB3; Thu, 30 Apr 2026 22:53:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1777589586; bh=bAi7Z9r7FKLTc0oPcxRXICFMDGTXiNN4gp19fbSt230=; h=From:Date:Subject:To:Cc:Reply-To:From; b=FGmIx/zpOYbc7i9+XbABPwwVHzAXTO5lUcJbGv6cziNkxw6rNMaW0MI7CDrxKaDKf Tx/zHPkFVA3SNR+69yeo4PwlBad1B0YivyDb8M3YVVBN/SwYLcQYK5GoX1Q/ndV1VZ H/tEaLrLUem4C0CwsRoGjF6UACesU56tTCesfwkrj9gD6sK+YORwivtR75ABBdgWKl h7PeCbulwUtT3XoBaQK7pfmY2twx66IFF+NzXxIwzzCsFE6AcEv8oJpX14TR7b7m5j EfIbZAjYEt/wwECJfdlWp+84heVlPglBgLkjfqQiuC884P33kVFDlR8EcaRcGNpnwG SCujuNRXuO2HQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id EEA08CD13DE; Thu, 30 Apr 2026 22:53:05 +0000 (UTC) From: Alireza Haghdoost via B4 Relay Date: Thu, 30 Apr 2026 22:52:53 +0000 Subject: [PATCH] checkpatch: recognize the Assisted-by: trailer 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: <20260430-fix-checkpatch-assisted-by-v1-1-46d3ef68a1de@uber.com> X-B4-Tracking: v=1; b=H4sIAETd82kC/x2NQQrCQAxFr1KyNjCtVtSriItMJnWCOJZJEUvp3 Zu6fLzP+wuYVBWDW7NAla+afopDe2iAM5WnoCZn6EJ3DqdjwEF/yFn4NdLEGclMbZKEccaL9Ne hFwqcWvBAJBOMlQrnPfEmH9ZdjFU883+9P9Z1A463cSaFAAAA To: Andy Whitcroft , Joe Perches , Dwaipayan Ray , Lukas Bulwahn Cc: linux-kernel@vger.kernel.org, Alireza Haghdoost X-Mailer: b4 0.12.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3855; i=haghdoost@uber.com; h=from:subject:message-id; bh=1L/K7YExDBD3NfbBSUkBDm0Ajzp1G2Obp39ZJ72g7eA=; b=owEBbQKS/ZANAwAKAVNlBDxl2ALYAcsmYgBp891RZReFtwOsixLJxYkesTWsqVMS87Nhh4/4I tECZCcIo5+JAjMEAAEKAB0WIQS5+sFL3gX/8PrA0S1TZQQ8ZdgC2AUCafPdUQAKCRBTZQQ8ZdgC 2F6FD/0b91gYN3TXa7oA8ym71E7i6/GIo05VSmrE4BlVFu1sL2MsjoR6bAX7uDcWY3jbfWSmHfu wJodNeNbtLEAoDtq7woGEABLYA0001icm2g6/Xh7QaZQwAYHxrMyoih7ERZRQrCI62ZnVoAxBa8 dVkb0YtpCf3A4JcjuBC6q9Ci4YmJ7aQEM3RJAK+qp0ttz3BPoCcEO34Z4dPsZMAGrlTo2HHKDPA y5uX8zlfWRtNtnHpS16XzOIEaEndKxckZlNUm+Pd2Nz6e54/oDLipH6rjMxdkjIqpXtgqDDMPy0 uH27ZAPRA+mOQ0uWlqvyQ5UTe1DZDTvrIRX1B9rh88u+N5EawyaZDWAQh9pp8YbC0Anqb5NWjpE XEe5V3/E82zPP6AzSV4MoKl31gS3g2sP8ZukBKrXThn5uvnh2kdWbNQIFDDFTFCZym266tH0xwV 5Ut3Dy/hWh/DkAyBE7j7WORR3G3cwIgqQwJBcAJlXWb0waVuTPQWccV6wumStKK/sYuMqe7CfYq Kwg93FFxLNI/dzfCl4xCUzf9DkAdsW2wF2Ph428VnZK7ll3Wzm307hykl4BkAkIL21SEOW1bhnk vhkvWicpFzdmLXfS1oNy2KMCWr7/bQiqMzA6GXSO5/qwZLbx8Ely2LLTQeRRP9vfJmGliY8WRbd 8he4nmayIekDUWw== X-Developer-Key: i=haghdoost@uber.com; a=openpgp; fpr=B9FAC14BDE05FFF0FAC0D12D5365043C65D802D8 X-Endpoint-Received: by B4 Relay for haghdoost@uber.com/default with auth_id=764 X-Original-From: Alireza Haghdoost Reply-To: haghdoost@uber.com From: Alireza Haghdoost Documentation/process/coding-assistants.rst, added in commit 78d979db6cef ("docs: add AI Coding Assistants documentation"), mandates an Assisted-by trailer for any patch developed with help from an AI coding assistant. The documented format is "Assisted-by: AGENT_NAME:MODEL_VERSION [TOOL1] [TOOL2]" (for example, "Assisted-by: Claude:claude-3-opus coccinelle sparse"). scripts/checkpatch.pl was not updated alongside the documentation. The trailer name matches the script's generic [a-z0-9_-]+by: pattern, so checkpatch (a) emits a "Non-standard signature: Assisted-by:" WARNING because Assisted-by: is absent from $signature_tags, and (b) emits an "Unrecognized email address" ERROR because the value is not an RFC 5322 email but the AGENT_NAME:MODEL_VERSION form prescribed by the spec. Both fire on every correctly-formed Assisted-by: tag, making it impossible to satisfy both the documentation and checkpatch at the same time. Add Assisted-by: to $signature_tags and to the @standard_signature_tags list (so suggested-typo correction works for it). Introduce a new $no_email_signature_tags pattern listing trailers that, by spec, do not carry an email address, and gate the email parse / format / stable address checks on it; today only Assisted-by: is in that list, but the mechanism is general for future tags with similar conventions. A regression test confirms a malformed sign-off line still triggers the "Unrecognized email address" ERROR after this change, since Signed-off-by is not in $no_email_signature_tags. Signed-off-by: Alireza Haghdoost Assisted-by: Cursor:claude-sonnet-4.5 --- Single patch. The commit message contains the full rationale and a description of the mechanism. No cover needed beyond what is there. --- scripts/checkpatch.pl | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index e56374662ff7..a9ebb67686ea 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -641,10 +641,19 @@ our $signature_tags =3D qr{(?xi: Reviewed-by:| Reported-by:| Suggested-by:| + Assisted-by:| To:| Cc: )}; =20 +# Trailers that do not carry an RFC 5322 email address. +# Documentation/process/coding-assistants.rst defines Assisted-by: as +# carrying "AGENT_NAME:MODEL_VERSION [TOOL1] [TOOL2]" rather than an +# email address; skip the email-format checks for these tags. +our $no_email_signature_tags =3D qr{(?xi: + Assisted-by: +)}; + our @link_tags =3D qw(Link Closes); =20 #Create a search and print patterns for all these strings to be used direc= tly below @@ -737,7 +746,7 @@ sub find_standard_signature { my ($sign_off) =3D @_; my @standard_signature_tags =3D ( 'Signed-off-by:', 'Co-developed-by:', 'Acked-by:', 'Tested-by:', - 'Reviewed-by:', 'Reported-by:', 'Suggested-by:' + 'Reviewed-by:', 'Reported-by:', 'Suggested-by:', 'Assisted-by:' ); foreach my $signature (@standard_signature_tags) { return $signature if (get_edit_distance($sign_off, $signature) <=3D 2); @@ -3105,6 +3114,9 @@ sub process { } } =20 + # Skip email-format checks for trailers that, by spec, do + # not carry an email address (e.g. Assisted-by:). + if ($sign_off !~ /$no_email_signature_tags/) { my ($email_name, $name_comment, $email_address, $comment) =3D parse_ema= il($email); my $suggested_email =3D format_email(($email_name, $name_comment, $emai= l_address, $comment)); if ($suggested_email eq "") { @@ -3189,6 +3201,7 @@ sub process { } } } + } =20 # Check for duplicate signatures my $sig_nospace =3D $line; --- base-commit: 46b513250491a7bfc97d98791dbe6a10bcc8129d change-id: 20260430-fix-checkpatch-assisted-by-8e59f5ea0cd1 Best regards, --=20 Alireza Haghdoost