From: Daniel P. Berrangé Date: Tue, 16 Sep 2025 08:16:31 +0000 (+0100) Subject: checkpatch: cull trailing '*/' in SPDX check X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4b948222c0801ddd428ca2e4260181ba35b219a3;p=thirdparty%2Fqemu.git checkpatch: cull trailing '*/' in SPDX check Sometimes SPDX expressions appear inside C comments, and this confuses checkpatch.pl. Drop the closing C comment characters to avoid this. Reviewed-by: Stefan Hajnoczi Signed-off-by: Daniel P. Berrangé Message-id: 20250916081638.764020-2-berrange@redhat.com Signed-off-by: Stefan Hajnoczi --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 833f20f5555..91616c974f2 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -1368,6 +1368,9 @@ sub checkspdx { $expr =~ s/^\s*//g; $expr =~ s/\s*$//g; + # Cull C comment end + $expr =~ s/\*\/.*//; + my @bits = split / +/, $expr; my $prefer = "GPL-2.0-or-later";