Skip to contentSkip to conversation

checkpatch: allow SPDX-License-Identifier

PATCH New Peter Xu 1 participant 1 message Apr 26, 2019 Checkpatch

lore
Share & tools
lore

Peter Xu

author
#0 lore raw

PATCH 1/1 checkpatch: allow SPDX-License-Identifier

According to: https://spdx.org/ids-how, let's still allow QEMU to use the SPDX license identifier:

// SPDX-License-Identifier: ***

CC Paolo Bonzini <[email protected]>
---
 scripts/checkpatch.pl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
scripts/checkpatch.pl +2 -1
index 88682cb0a9..c2aaf421da 100755
@@ -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.
Signature · 1 line
2.17.1