]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
checkpatch: cull trailing '*/' in SPDX check
authorDaniel P. Berrangé <berrange@redhat.com>
Tue, 16 Sep 2025 08:16:31 +0000 (09:16 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Tue, 16 Sep 2025 17:31:40 +0000 (13:31 -0400)
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 <stefanha@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-id: 20250916081638.764020-2-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
scripts/checkpatch.pl

index 833f20f555531de315251423f5fa7025c1bd41b6..91616c974f2c3cb327a1d8416c910cab11672bea 100755 (executable)
@@ -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";