[Devel] [PATCH hci-8.1 1/2] ms/checkpatch: add support for Assisted-by tag
no-reply at sashiko.virtuozzo.com
no-reply at sashiko.virtuozzo.com
Sat Oct 17 00:37:37 MSK 2026
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] checkpatch: Assisted-by block's unconditional next skips later per-line checks
--
commit 5a811b60fe8be1a0a89ee89ba84a4ed4223a05c3
Author: Sasha Levin <sashal at kernel.org>
ms/checkpatch: add support for Assisted-by tag
This commit teaches checkpatch.pl to recognize the Assisted-by tag. It adds
the tag to $signature_tags and skips email validation for Assisted-by lines.
It also warns when the value doesn't look like AGENT_NAME:MODEL_VERSION.
Link: https://lkml.kernel.org/r/20260311215818.518930-1-sashal@kernel.org
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
[ ... ]
> @@ -3072,6 +3073,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;
> + }
> +
[Severity: Low]
Does the unconditional next; here skip checks that should still run for
Assisted-by lines?
In process(), this block sits inside the per-line loop. For a line such as
"Assisted-by: X", $sign_off is "Assisted-by:", so the new block ends with
next; and jumps to the next input line.
That skips the "# Check for duplicate signatures" code that records
$signatures{$sig_nospace}, so duplicate Assisted-by lines would never be
reported as "Duplicate signature". It also skips the other per-line checks
that follow the signature block, such as the repeated-word check.
The follow-up patch 7d898d23 ("ms/checkpatch.pl: adapt to new Assisted-by:
format") changes only the value check, to an empty-value check with
different warning text. It keeps the unconditional next;, so the final
series state still skips those checks.
Would an if/else around the email validation, instead of next;, avoid this?
> 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 "") {
[ ... ]
--
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261016-checkpatch-v1-0-3aceda8d9600@virtuozzo.com?part=1
More information about the Devel
mailing list