checkpatch: allow SPDX-License-Identifier
authorPeter Xu <peterx@redhat.com>
Fri, 26 Apr 2019 06:27:05 +0000 (14:27 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 3 Jun 2019 12:03:01 +0000 (14:03 +0200)
According to: https://spdx.org/ids-how, let's still allow QEMU to use
the SPDX license identifier:

// SPDX-License-Identifier: ***

CC: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20190426062705.4651-1-peterx@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
scripts/checkpatch.pl

index 88682cb0a9f324e0f56a00037d394fb548b59566..c2aaf421da32c3b8405e638666e8cba18745dbad 100755 (executable)
@@ -1949,7 +1949,8 @@ sub process {
                }
 
 # no C99 // comments
-               if ($line =~ m{//}) {
+               if ($line =~ m{//} &&
+                   $rawline !~ m{// SPDX-License-Identifier: }) {
                        ERROR("do not use C99 // comments\n" . $herecurr);
                }
                # Remove C99 comments.