summary refs log tree commit diff stats
path: root/scripts
diff options
context:
space:
mode:
authorDaniel P. Berrangé <berrange@redhat.com>2025-09-16 09:16:31 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2025-09-16 13:31:40 -0400
commit4b948222c0801ddd428ca2e4260181ba35b219a3 (patch)
tree27ce41eb79f3d437994307ce8f57a63353d3c8d0 /scripts
parent190d5d7fd725ff754f94e8e0cbfb69f279c82b5d (diff)
downloadfocaccia-qemu-4b948222c0801ddd428ca2e4260181ba35b219a3.tar.gz
focaccia-qemu-4b948222c0801ddd428ca2e4260181ba35b219a3.zip
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 <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>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkpatch.pl3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 833f20f555..91616c974f 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";