Kernel KVM virtualization development
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH] checkpatch: add support for Assisted-by tag
@ 2026-06-22 16:41 Andrew Jones
  2026-06-22 16:43 ` Paolo Bonzini
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Jones @ 2026-06-22 16:41 UTC (permalink / raw)
  To: kvm; +Cc: pbonzini, thuth

Import Linux commit d1db4118489f ("checkpatch: add support for
Assisted-by tag").

(I should have used AI for this, since it'd be fun to include that
tag on this tag-enabling patch, but sometimes I still do my own
homework!)

Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
---
 scripts/checkpatch.pl | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index e858261c95a8..653bec1f6ea5 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -626,6 +626,7 @@ our $signature_tags = qr{(?xi:
 	Reviewed-by:|
 	Reported-by:|
 	Suggested-by:|
+	Assisted-by:|
 	To:|
 	Cc:
 )};
@@ -3073,6 +3074,15 @@ sub process {
 				}
 			}
 
+			# Assisted-by uses AGENT_NAME:MODEL_VERSION format, not email
+			if ($sign_off =~ /^Assisted-by:/i) {
+				if ($email !~ /^\S+:\S+/) {
+					WARN("BAD_SIGN_OFF",
+					     "Assisted-by expects 'AGENT_NAME:MODEL_VERSION [TOOL1] [TOOL2]' format\n" . $herecurr);
+				}
+				next;
+			}
+
 			my ($email_name, $name_comment, $email_address, $comment) = parse_email($email);
 			my $suggested_email = format_email(($email_name, $name_comment, $email_address, $comment));
 			if ($suggested_email eq "") {
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [kvm-unit-tests PATCH] checkpatch: add support for Assisted-by tag
  2026-06-22 16:41 [kvm-unit-tests PATCH] checkpatch: add support for Assisted-by tag Andrew Jones
@ 2026-06-22 16:43 ` Paolo Bonzini
  2026-06-22 19:00   ` Andrew Jones
  0 siblings, 1 reply; 3+ messages in thread
From: Paolo Bonzini @ 2026-06-22 16:43 UTC (permalink / raw)
  To: Andrew Jones; +Cc: kvm, thuth

On Mon, Jun 22, 2026 at 6:41 PM Andrew Jones <andrew.jones@linux.dev> wrote:
>
> Import Linux commit d1db4118489f ("checkpatch: add support for
> Assisted-by tag").
>
> (I should have used AI for this, since it'd be fun to include that
> tag on this tag-enabling patch, but sometimes I still do my own
> homework!)

Personally, I don't see the point in providing free advertising to AI
companies, so if I had to choose I would do "WARN(...) if ($sign_off
=~ /^Assisted-by:/i)". It's more important to know what AI was used
*for*, than what AI was used period.

But I won't complain if people want this patch.

Paolo

>
> Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
> ---
>  scripts/checkpatch.pl | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index e858261c95a8..653bec1f6ea5 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -626,6 +626,7 @@ our $signature_tags = qr{(?xi:
>         Reviewed-by:|
>         Reported-by:|
>         Suggested-by:|
> +       Assisted-by:|
>         To:|
>         Cc:
>  )};
> @@ -3073,6 +3074,15 @@ sub process {
>                                 }
>                         }
>
> +                       # Assisted-by uses AGENT_NAME:MODEL_VERSION format, not email
> +                       if ($sign_off =~ /^Assisted-by:/i) {
> +                               if ($email !~ /^\S+:\S+/) {
> +                                       WARN("BAD_SIGN_OFF",
> +                                            "Assisted-by expects 'AGENT_NAME:MODEL_VERSION [TOOL1] [TOOL2]' format\n" . $herecurr);
> +                               }
> +                               next;
> +                       }
> +
>                         my ($email_name, $name_comment, $email_address, $comment) = parse_email($email);
>                         my $suggested_email = format_email(($email_name, $name_comment, $email_address, $comment));
>                         if ($suggested_email eq "") {
> --
> 2.43.0
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [kvm-unit-tests PATCH] checkpatch: add support for Assisted-by tag
  2026-06-22 16:43 ` Paolo Bonzini
@ 2026-06-22 19:00   ` Andrew Jones
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Jones @ 2026-06-22 19:00 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: kvm, thuth

On Mon, Jun 22, 2026 at 06:43:45PM +0200, Paolo Bonzini wrote:
> On Mon, Jun 22, 2026 at 6:41 PM Andrew Jones <andrew.jones@linux.dev> wrote:
> >
> > Import Linux commit d1db4118489f ("checkpatch: add support for
> > Assisted-by tag").
> >
> > (I should have used AI for this, since it'd be fun to include that
> > tag on this tag-enabling patch, but sometimes I still do my own
> > homework!)
> 
> Personally, I don't see the point in providing free advertising to AI
> companies, so if I had to choose I would do "WARN(...) if ($sign_off
> =~ /^Assisted-by:/i)". It's more important to know what AI was used
> *for*, than what AI was used period.
> 
> But I won't complain if people want this patch.

The process is now well established over in Linux kernel land and we
encourage kvm-unit-tests contributors to follow Linux processes. The
motivation for this patch is because I just queued an ARM patch which
used the Linux process and it failed checkpatch. I'd rather checkpatch
succeed than to have to tell people to remove/modify the tags they're
used to using with the kernel.

We can encourage contributors to also add sentences stating how AI
assisted when an AI assistance tag is provided in order to capture
the "AI used for what" part.

Thanks,
drew

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-06-22 19:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-22 16:41 [kvm-unit-tests PATCH] checkpatch: add support for Assisted-by tag Andrew Jones
2026-06-22 16:43 ` Paolo Bonzini
2026-06-22 19:00   ` Andrew Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox