From nobody Tue Jun 16 06:29:03 2026 Received: from jpms-ob02-os7.noc.sony.co.jp (jpms-ob02-os7.noc.sony.co.jp [211.125.139.72]) (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 7D5B7134CF for ; Fri, 17 Apr 2026 02:18:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.125.139.72 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776392326; cv=none; b=JHQfKZPI6eEZn60ak7t71udcwXMSnsCgI0TbLzCzRytuU/n4WYSHMIaaj85yVQGCage49dLE7GvVpUas5Zg76XC4m+SrmnvpW1YQaNMfGvH33lO3Y3XNPjOXjIsndQSDwvJ7m4Al+a5bA2qZy8tPngWRs2q3V2C6/grplS3+C44= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776392326; c=relaxed/simple; bh=Sxd5Mfq7FKEx+KmO1+9VJm++sGNhJ2zkuWUjJmj237k=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=GdWe6/zDoTGd0j3nZ/TOT8HKk44rHLGoqwe8VliFMJww9ZOjdkXq/tyJfl1438gJh2O3BjuU7aoAt4qceLTwstn52NYXbdbV97MsjXJ4lAKRJ/Noi/Mg1ws0zpJiGaJm3/cILvXkF5QOptUFRVI7cSHaHDmTCSVvEdvQHF7xtys= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sony.com; spf=fail smtp.mailfrom=sony.com; dkim=pass (2048-bit key) header.d=sony.com header.i=@sony.com header.b=BxnuH8Hn; arc=none smtp.client-ip=211.125.139.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sony.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=sony.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sony.com header.i=@sony.com header.b="BxnuH8Hn" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sony.com; s=s1jp; t=1776392323; x=1807928323; h=from:date:subject:mime-version:content-transfer-encoding: message-id:to:cc; bh=uH7g9wGVWj+MfpZYIU4yoIxJIynUw5X8CPIRwPbhLZA=; b=BxnuH8HnUpuz6M58dKnOQ+Z1O7S/OOLA2/MopqXrlGAyUB5m4npnougn ZgUu80ULq13JIaAldyPmjNz9p3WDcaGgbMecCXfM3meOUBG1pYsZgZ9Mf 2F6w5s4pdugrzc+9L7p6UVbywCOi2vtm5fAdQJblSHFzWwQ+ZKAgGGxZj UUSyACeLDvTUTVmBD6s02WILlMQTlFG4aMIYT/fIhAc7xcSKnAplZLAaF W/qgj0DAF62o1UOzhbZHkZpWPMZDvZx5M8QqyWn+EkqWESx2hLW6aQifb tAY8FktpmkuIt/I1xOsyyvFYcN5+6hcuWd7904x0Mgry10ddKk/kSTvH4 w==; X-CSE-ConnectionGUID: 8uhQ5MOzRky8X0yNiuLOWw== X-CSE-MsgGUID: rKrXbybRRFu1Ms3WX2pDUQ== Received: from unknown (HELO jpmta-ob02-os7.noc.sony.co.jp) ([IPv6:2001:cf8:acf:1104::7]) by jpms-ob02-os7.noc.sony.co.jp with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Apr 2026 11:18:42 +0900 X-CSE-ConnectionGUID: iG2szmLvTxqEUi9tWpLFVg== X-CSE-MsgGUID: OtMwhK5zTZGSTTuqK7G2yw== X-IronPort-AV: E=Sophos;i="6.23,183,1770562800"; d="scan'208";a="50450427" Received: from unknown (HELO [127.0.1.1]) ([IPv6:2001:cf8:1:573:0:dddd:6b3e:119e]) by jpmta-ob02-os7.noc.sony.co.jp with ESMTP; 17 Apr 2026 11:18:41 +0900 From: Shashank Balaji Date: Fri, 17 Apr 2026 11:18:26 +0900 Subject: [PATCH] checkpatch: add Assisted-by tag 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: <20260417-add-assisted-by-to-checkpatch-v1-1-7af87500992b@sony.com> X-B4-Tracking: v=1; b=H4sIAHGY4WkC/yXMwQ6CMAwA0F8hPdsENgLirxgOo62umgBZp9EQ/ t2px3d5G5gkFYNTtUGSp5ouc0FzqIBimK+CysXgatfVbdNjYMZgppaFcXpjXpCi0H0NmSL6MLA f2mPfOQ/lWJNc9PX7z+Pf9phuQvmbwr5/APejoHyBAAAA X-Change-ID: 20260417-add-assisted-by-to-checkpatch-3a9d39487623 To: Andy Whitcroft , Joe Perches , Dwaipayan Ray , Lukas Bulwahn Cc: linux-kernel@vger.kernel.org, Rahul Bukte , Daniel Palmer , Shashank Balaji X-Mailer: b4 0.16-dev-3bfbc X-Developer-Signature: v=1; a=openpgp-sha256; l=8743; i=shashank.mahadasyam@sony.com; h=from:subject:message-id; bh=Sxd5Mfq7FKEx+KmO1+9VJm++sGNhJ2zkuWUjJmj237k=; b=owGbwMvMwCU2bX1+URVTXyjjabUkhsyHMxpP5j057zj36/n1KY7TJkusuejz68PR328l+Zmn3 pO6kBq5pKOUhUGMi0FWTJGlVKn6194VQUt6zrxWhJnDygQyhIGLUwAmIvOLkWHX9MJln7TTvipu 0Vx48OPSKbN+m+ZnMln7Svp0c2wQ0DRh+O9+V/jb98yGXMEjT0y6/881OLau5TFD7opJZs5nWbO e3uAFAA== X-Developer-Key: i=shashank.mahadasyam@sony.com; a=openpgp; fpr=75227BFABDA852A48CCCEB2196AF6F727A028E55 Assisted-by tag is mentioned in coding-assistants.rst and submitting-patche= s.rst, but checkpatch still complains about it, so fix it. Email check is refactored into a function, and it's skipped for Assisted-by. No syntax check is added for Assisted-by, but it may be added in the future to enforce the format specified in coding-assistants.rst: Assisted-by: AGENT_NAME:MODEL_VERSION [TOOL1] [TOOL2] Assisted-by: Claude:claude-4.6-sonnet Acked-by: Rahul Bukte Signed-off-by: Shashank Balaji --- scripts/checkpatch.pl | 176 ++++++++++++++++++++++++++--------------------= ---- 1 file changed, 91 insertions(+), 85 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index e56374662ff7..a98b3c4f40e3 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -636,6 +636,7 @@ our $allocFunctions =3D qr{(?x: our $signature_tags =3D qr{(?xi: Signed-off-by:| Co-developed-by:| + Assisted-by:| Acked-by:| Tested-by:| Reviewed-by:| @@ -737,7 +738,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); @@ -2649,6 +2650,94 @@ sub is_userspace { return ($realfile =3D~ m@^tools/@ || $realfile =3D~ m@^scripts/@); } =20 +sub check_sign_off_email { + my ($email, $herecurr) =3D @_; + my ($email_name, $name_comment, $email_address, $comment) =3D parse_email= ($email); + my $suggested_email =3D format_email(($email_name, $name_comment, $email_= address, $comment)); + if ($suggested_email eq "") { + ERROR("BAD_SIGN_OFF", + "Unrecognized email address: '$email'\n" . $herecurr); + } else { + my $dequoted =3D $suggested_email; + $dequoted =3D~ s/^"//; + $dequoted =3D~ s/" 1) { + WARN("BAD_SIGN_OFF", + "Use a single name comment in email: '$email'\n" . $herecurr); + } + + + # stable@vger.kernel.org or stable@kernel.org shouldn't + # have an email name. In addition comments should strictly + # begin with a # + if ($email =3D~ /^.*stable\@(?:vger\.)?kernel\.org/i) { + if (($comment ne "" && $comment !~ /^#.+/) || + ($email_name ne "")) { + my $cur_name =3D $email_name; + my $new_comment =3D $comment; + $cur_name =3D~ s/[a-zA-Z\s\-\"]+//g; + + # Remove brackets enclosing comment text + # and # from start of comments to get comment text + $new_comment =3D~ s/^\((.*)\)$/$1/; + $new_comment =3D~ s/^\[(.*)\]$/$1/; + $new_comment =3D~ s/^[\s\#]+|\s+$//g; + + $new_comment =3D trim("$new_comment $cur_name") if ($cur_name ne $new_= comment); + $new_comment =3D " # $new_comment" if ($new_comment ne ""); + my $new_email =3D "$email_address$new_comment"; + + if (WARN("BAD_STABLE_ADDRESS_STYLE", + "Invalid email format for stable: '$email', prefer '$new_email'\n" .= $herecurr) && + $fix) { + $fixed[$fixlinenr] =3D~ s/\Q$email\E/$new_email/; + } + } + } elsif ($comment ne "" && $comment !~ /^(?:#.+|\(.+\))$/) { + my $new_comment =3D $comment; + + # Extract comment text from within brackets or + # c89 style /*...*/ comments + $new_comment =3D~ s/^\[(.*)\]$/$1/; + $new_comment =3D~ s/^\/\*(.*)\*\/$/$1/; + + $new_comment =3D trim($new_comment); + $new_comment =3D~ s/^[^\w]$//; # Single lettered comment with non word = character is usually a typo + $new_comment =3D "($new_comment)" if ($new_comment ne ""); + my $new_email =3D format_email($email_name, $name_comment, $email_addre= ss, $new_comment); + + if (WARN("BAD_SIGN_OFF", + "Unexpected content after email: '$email', should be: '$new_email'\n"= . $herecurr) && + $fix) { + $fixed[$fixlinenr] =3D~ s/\Q$email\E/$new_email/; + } + } + } +} + sub process { my $filename =3D shift; =20 @@ -3105,90 +3194,7 @@ sub process { } } =20 - 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 "") { - ERROR("BAD_SIGN_OFF", - "Unrecognized email address: '$email'\n" . $herecurr); - } else { - my $dequoted =3D $suggested_email; - $dequoted =3D~ s/^"//; - $dequoted =3D~ s/" 1) { - WARN("BAD_SIGN_OFF", - "Use a single name comment in email: '$email'\n" . $herecurr); - } - - - # stable@vger.kernel.org or stable@kernel.org shouldn't - # have an email name. In addition comments should strictly - # begin with a # - if ($email =3D~ /^.*stable\@(?:vger\.)?kernel\.org/i) { - if (($comment ne "" && $comment !~ /^#.+/) || - ($email_name ne "")) { - my $cur_name =3D $email_name; - my $new_comment =3D $comment; - $cur_name =3D~ s/[a-zA-Z\s\-\"]+//g; - - # Remove brackets enclosing comment text - # and # from start of comments to get comment text - $new_comment =3D~ s/^\((.*)\)$/$1/; - $new_comment =3D~ s/^\[(.*)\]$/$1/; - $new_comment =3D~ s/^[\s\#]+|\s+$//g; - - $new_comment =3D trim("$new_comment $cur_name") if ($cur_name ne $ne= w_comment); - $new_comment =3D " # $new_comment" if ($new_comment ne ""); - my $new_email =3D "$email_address$new_comment"; - - if (WARN("BAD_STABLE_ADDRESS_STYLE", - "Invalid email format for stable: '$email', prefer '$new_email'\n"= . $herecurr) && - $fix) { - $fixed[$fixlinenr] =3D~ s/\Q$email\E/$new_email/; - } - } - } elsif ($comment ne "" && $comment !~ /^(?:#.+|\(.+\))$/) { - my $new_comment =3D $comment; - - # Extract comment text from within brackets or - # c89 style /*...*/ comments - $new_comment =3D~ s/^\[(.*)\]$/$1/; - $new_comment =3D~ s/^\/\*(.*)\*\/$/$1/; - - $new_comment =3D trim($new_comment); - $new_comment =3D~ s/^[^\w]$//; # Single lettered comment with non wor= d character is usually a typo - $new_comment =3D "($new_comment)" if ($new_comment ne ""); - my $new_email =3D format_email($email_name, $name_comment, $email_add= ress, $new_comment); - - if (WARN("BAD_SIGN_OFF", - "Unexpected content after email: '$email', should be: '$new_email'\= n" . $herecurr) && - $fix) { - $fixed[$fixlinenr] =3D~ s/\Q$email\E/$new_email/; - } - } - } + check_sign_off_email($email, $herecurr) if $sign_off !~ /^assisted-by:$= /i; =20 # Check for duplicate signatures my $sig_nospace =3D $line; --- base-commit: 3cd8b194bf3428dfa53120fee47e827a7c495815 change-id: 20260417-add-assisted-by-to-checkpatch-3a9d39487623 Best regards, -- =20 Shashank Balaji