diff mbox series

[v3,01/12] checkpatch: Allow SPDX-License-Identifier

Message ID 20190530092919.26059-2-peterx@redhat.com
State New
Headers show
Series kvm/migration: support KVM_CLEAR_DIRTY_LOG | expand

Commit Message

Peter Xu May 30, 2019, 9:29 a.m. UTC
According to: https://spdx.org/ids-how, let's still allow QEMU to use
the SPDX license identifier:

// SPDX-License-Identifier: ***

Signed-off-by: Peter Xu <peterx@redhat.com>
---
 scripts/checkpatch.pl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Juan Quintela May 31, 2019, 12:56 p.m. UTC | #1
Peter Xu <peterx@redhat.com> wrote:
> According to: https://spdx.org/ids-how, let's still allow QEMU to use
> the SPDX license identifier:
>
> // SPDX-License-Identifier: ***
>
> Signed-off-by: Peter Xu <peterx@redhat.com>

Reviewed-by: Juan Quintela <quintela@redhat.com>

Althought this patch don't belong to the series O:-)
Peter Xu June 3, 2019, 6:21 a.m. UTC | #2
On Fri, May 31, 2019 at 02:56:21PM +0200, Juan Quintela wrote:
> Peter Xu <peterx@redhat.com> wrote:
> > According to: https://spdx.org/ids-how, let's still allow QEMU to use
> > the SPDX license identifier:
> >
> > // SPDX-License-Identifier: ***
> >
> > Signed-off-by: Peter Xu <peterx@redhat.com>
> 
> Reviewed-by: Juan Quintela <quintela@redhat.com>
> 
> Althought this patch don't belong to the series O:-)

Right. :)  And Paolo should have queued the patch.

To make life easier, I plan to simply drop this patch in next spin and
change the only user of "// SPDX-License-Identifier" patch in the
series to simply use "/* ... */" since I just noticed vast codes in
QEMU is using that... then we don't have to depend on this patch.
Paolo Bonzini June 3, 2019, 8:01 a.m. UTC | #3
On 03/06/19 08:21, Peter Xu wrote:
> On Fri, May 31, 2019 at 02:56:21PM +0200, Juan Quintela wrote:
>> Peter Xu <peterx@redhat.com> wrote:
>>> According to: https://spdx.org/ids-how, let's still allow QEMU to use
>>> the SPDX license identifier:
>>>
>>> // SPDX-License-Identifier: ***
>>>
>>> Signed-off-by: Peter Xu <peterx@redhat.com>
>>
>> Reviewed-by: Juan Quintela <quintela@redhat.com>
>>
>> Althought this patch don't belong to the series O:-)
> 
> Right. :)  And Paolo should have queued the patch.
> 
> To make life easier, I plan to simply drop this patch in next spin and
> change the only user of "// SPDX-License-Identifier" patch in the
> series to simply use "/* ... */" since I just noticed vast codes in
> QEMU is using that... then we don't have to depend on this patch.

No problem, I'll send a pull request today.

Paolo
diff mbox series

Patch

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 88682cb0a9..c2aaf421da 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -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.