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>
This commit is contained in:
parent
190d5d7fd7
commit
4b948222c0
1 changed files with 3 additions and 0 deletions
|
|
@ -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";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue