* [PATCH] staging: vt6656: Use the correct style for SPDX license Identifier @ 2019-02-05 15:06 Nishad Kamdar 2019-02-05 18:44 ` Greg Kroah-Hartman 0 siblings, 1 reply; 7+ messages in thread From: Nishad Kamdar @ 2019-02-05 15:06 UTC (permalink / raw) To: Forest Bond, Greg Kroah-Hartman, Greg Kroah-Hartman Cc: Nishad Kamdar, devel, linux-kernel This patch corrects the style for SPDX license Identifier in mac.h by using "/* */" in place of "//" as per Linux kernel licensing rules. Issue found by checkpatch. Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com> --- drivers/staging/vt6656/mac.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/vt6656/mac.h b/drivers/staging/vt6656/mac.h index 94e700fcd0b6..75166020f7c6 100644 --- a/drivers/staging/vt6656/mac.h +++ b/drivers/staging/vt6656/mac.h @@ -1,5 +1,5 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* +/* SPDX-License-Identifier: GPL-2.0+ + * * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc. * All rights reserved. * -- 2.17.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] staging: vt6656: Use the correct style for SPDX license Identifier 2019-02-05 15:06 [PATCH] staging: vt6656: Use the correct style for SPDX license Identifier Nishad Kamdar @ 2019-02-05 18:44 ` Greg Kroah-Hartman 2019-02-05 18:59 ` Joe Perches 2019-02-12 15:09 ` Nishad Kamdar 0 siblings, 2 replies; 7+ messages in thread From: Greg Kroah-Hartman @ 2019-02-05 18:44 UTC (permalink / raw) To: Nishad Kamdar; +Cc: Forest Bond, devel, linux-kernel On Tue, Feb 05, 2019 at 08:36:24PM +0530, Nishad Kamdar wrote: > This patch corrects the style for SPDX license Identifier in mac.h > by using "/* */" in place of "//" as per Linux kernel licensing rules. > Issue found by checkpatch. > > Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com> > --- > drivers/staging/vt6656/mac.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/vt6656/mac.h b/drivers/staging/vt6656/mac.h > index 94e700fcd0b6..75166020f7c6 100644 > --- a/drivers/staging/vt6656/mac.h > +++ b/drivers/staging/vt6656/mac.h > @@ -1,5 +1,5 @@ > -// SPDX-License-Identifier: GPL-2.0+ > -/* > +/* SPDX-License-Identifier: GPL-2.0+ Should really be: /* SPDX-License-Identifier: GPL-2.0+ */ thanks, greg k-h ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] staging: vt6656: Use the correct style for SPDX license Identifier 2019-02-05 18:44 ` Greg Kroah-Hartman @ 2019-02-05 18:59 ` Joe Perches 2019-02-06 16:25 ` Greg Kroah-Hartman 2019-02-12 15:09 ` Nishad Kamdar 1 sibling, 1 reply; 7+ messages in thread From: Joe Perches @ 2019-02-05 18:59 UTC (permalink / raw) To: Greg Kroah-Hartman, Nishad Kamdar; +Cc: Forest Bond, devel, linux-kernel On Tue, 2019-02-05 at 19:44 +0100, Greg Kroah-Hartman wrote: > On Tue, Feb 05, 2019 at 08:36:24PM +0530, Nishad Kamdar wrote: > > This patch corrects the style for SPDX license Identifier in mac.h > > by using "/* */" in place of "//" as per Linux kernel licensing rules. > > Issue found by checkpatch. > > > > Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com> > > --- > > drivers/staging/vt6656/mac.h | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/staging/vt6656/mac.h b/drivers/staging/vt6656/mac.h > > index 94e700fcd0b6..75166020f7c6 100644 > > --- a/drivers/staging/vt6656/mac.h > > +++ b/drivers/staging/vt6656/mac.h > > @@ -1,5 +1,5 @@ > > -// SPDX-License-Identifier: GPL-2.0+ > > -/* > > +/* SPDX-License-Identifier: GPL-2.0+ > > Should really be: > > /* SPDX-License-Identifier: GPL-2.0+ */ There's a fair number of style inconsistencies in the kernel sources for that already. ~8% of the .h files that have an 'SPDX-License-Identifier:' don't use the recommended style. $ git grep -h "SPDX-License" -- '*.h' | \ perl -p -e 's@Identifier:.*\*/*@Identifier: ... */@; s@Identifier: [^\.].*@Identifier:@' | \ sort | uniq -c | sort -rn 8506 /* SPDX-License-Identifier: ... */ 593 // SPDX-License-Identifier: 154 /* SPDX-License-Identifier: 53 * SPDX-License-Identifier: 1 * SPDX-License-Identifier: GPL-2.0 1 //SPDX-License-Identifier: 1 /* SPDX-License-Identifier: ... */ ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] staging: vt6656: Use the correct style for SPDX license Identifier 2019-02-05 18:59 ` Joe Perches @ 2019-02-06 16:25 ` Greg Kroah-Hartman 2019-02-07 7:17 ` Joe Perches 0 siblings, 1 reply; 7+ messages in thread From: Greg Kroah-Hartman @ 2019-02-06 16:25 UTC (permalink / raw) To: Joe Perches; +Cc: Nishad Kamdar, devel, Forest Bond, linux-kernel On Tue, Feb 05, 2019 at 10:59:40AM -0800, Joe Perches wrote: > On Tue, 2019-02-05 at 19:44 +0100, Greg Kroah-Hartman wrote: > > On Tue, Feb 05, 2019 at 08:36:24PM +0530, Nishad Kamdar wrote: > > > This patch corrects the style for SPDX license Identifier in mac.h > > > by using "/* */" in place of "//" as per Linux kernel licensing rules. > > > Issue found by checkpatch. > > > > > > Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com> > > > --- > > > drivers/staging/vt6656/mac.h | 4 ++-- > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > diff --git a/drivers/staging/vt6656/mac.h b/drivers/staging/vt6656/mac.h > > > index 94e700fcd0b6..75166020f7c6 100644 > > > --- a/drivers/staging/vt6656/mac.h > > > +++ b/drivers/staging/vt6656/mac.h > > > @@ -1,5 +1,5 @@ > > > -// SPDX-License-Identifier: GPL-2.0+ > > > -/* > > > +/* SPDX-License-Identifier: GPL-2.0+ > > > > Should really be: > > > > /* SPDX-License-Identifier: GPL-2.0+ */ > > There's a fair number of style inconsistencies in the kernel > sources for that already. > > ~8% of the .h files that have an 'SPDX-License-Identifier:' > don't use the recommended style. > > $ git grep -h "SPDX-License" -- '*.h' | \ > perl -p -e 's@Identifier:.*\*/*@Identifier: ... */@; s@Identifier: [^\.].*@Identifier:@' | \ > sort | uniq -c | sort -rn > 8506 /* SPDX-License-Identifier: ... */ > 593 // SPDX-License-Identifier: > 154 /* SPDX-License-Identifier: > 53 * SPDX-License-Identifier: > 1 * SPDX-License-Identifier: GPL-2.0 > 1 //SPDX-License-Identifier: > 1 /* SPDX-License-Identifier: ... */ Then let's fix them, the documentation says what the correct format is, there's no reason we can't actually follow what is written... ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] staging: vt6656: Use the correct style for SPDX license Identifier 2019-02-06 16:25 ` Greg Kroah-Hartman @ 2019-02-07 7:17 ` Joe Perches 2019-02-13 14:22 ` Nishad Kamdar 0 siblings, 1 reply; 7+ messages in thread From: Joe Perches @ 2019-02-07 7:17 UTC (permalink / raw) To: Greg Kroah-Hartman; +Cc: Nishad Kamdar, devel, Forest Bond, linux-kernel [-- Attachment #1: Type: text/plain, Size: 3401 bytes --] On Wed, 2019-02-06 at 17:25 +0100, Greg Kroah-Hartman wrote: > On Tue, Feb 05, 2019 at 10:59:40AM -0800, Joe Perches wrote: > > On Tue, 2019-02-05 at 19:44 +0100, Greg Kroah-Hartman wrote: > > > On Tue, Feb 05, 2019 at 08:36:24PM +0530, Nishad Kamdar wrote: > > > > This patch corrects the style for SPDX license Identifier in mac.h > > > > by using "/* */" in place of "//" as per Linux kernel licensing rules. > > > > Issue found by checkpatch. > > > > > > > > Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com> > > > > --- > > > > drivers/staging/vt6656/mac.h | 4 ++-- > > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > > > diff --git a/drivers/staging/vt6656/mac.h b/drivers/staging/vt6656/mac.h > > > > index 94e700fcd0b6..75166020f7c6 100644 > > > > --- a/drivers/staging/vt6656/mac.h > > > > +++ b/drivers/staging/vt6656/mac.h > > > > @@ -1,5 +1,5 @@ > > > > -// SPDX-License-Identifier: GPL-2.0+ > > > > -/* > > > > +/* SPDX-License-Identifier: GPL-2.0+ > > > > > > Should really be: > > > > > > /* SPDX-License-Identifier: GPL-2.0+ */ > > > > There's a fair number of style inconsistencies in the kernel > > sources for that already. > > > > ~8% of the .h files that have an 'SPDX-License-Identifier:' > > don't use the recommended style. > > > > $ git grep -h "SPDX-License" -- '*.h' | \ > > perl -p -e 's@Identifier:.*\*/*@Identifier: ... */@; s@Identifier: [^\.].*@Identifier:@' | \ > > sort | uniq -c | sort -rn > > 8506 /* SPDX-License-Identifier: ... */ > > 593 // SPDX-License-Identifier: > > 154 /* SPDX-License-Identifier: > > 53 * SPDX-License-Identifier: > > 1 * SPDX-License-Identifier: GPL-2.0 > > 1 //SPDX-License-Identifier: > > 1 /* SPDX-License-Identifier: ... */ > > Then let's fix them, the documentation says what the correct format is, > there's no reason we can't actually follow what is written... So here's a script that does most all of them except the 50 or so that use the SPDX-License-Identifier in the middle of a comment block. Using: $ git grep --name-only 'SPDX-License-Identifier:' -- '*.h' | \ xargs grep -L '/\* SPDX-License-Identifier:.*\*/'| \ while read file ; do perl -i update_spdx.perl $file ; done produces $ git diff --shortstat 748 files changed, 902 insertions(+), 902 deletions(-) And $ git grep -h "SPDX-License" -- '*.h' | \ perl -p -e 's@Identifier:.*\*/*@Identifier: ... */@; s@Identifier: [^\.].*@Identifier:@' | \ sort | uniq -c | sort -rn 9254 /* SPDX-License-Identifier: ... */ 53 * SPDX-License-Identifier: 1 * SPDX-License-Identifier: GPL-2.0 1 /* SPDX-License-Identifier: ... */ and the perl script below is also attached $ cat update_spdx.perl local $/; my $file = (<>); my $spdx_regex = '/\*[ \t]*SPDX-License-Identifier:[ \t]*'; my $spdx_actual = '/* SPDX-License-Identifier: '; # any // use converted to /* ... */ $file =~ s@^//[ \t]*SPDX-License-Identifier:[ \t]*(.*)\n@/* SPDX-License-Identifier: $1 */\n@; # first line use with /* without trailing */ gets */ added and 2nd line updated $file =~ m@^\s*${spdx_regex}([^\n]+)\n@; if (defined $1 && $1 !~ m@\*/$@) { $file =~ s@^[ \t]*${spdx_regex}([^\n]+)\n@${spdx_actual}$1 */\n/* @; $file =~ s@^[ \t]*${spdx_regex}([^\n]+)\n[ \t]*/\*[ \t]+\*@${spdx_actual}$1\n/* @; $file =~ s@^\s*${spdx_regex}([^\n]+)\n/\* \n@${spdx_actual}$1\n/*\n@; } print $file; [-- Attachment #2: update_spdx.perl --] [-- Type: application/x-perl, Size: 677 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] staging: vt6656: Use the correct style for SPDX license Identifier 2019-02-07 7:17 ` Joe Perches @ 2019-02-13 14:22 ` Nishad Kamdar 0 siblings, 0 replies; 7+ messages in thread From: Nishad Kamdar @ 2019-02-13 14:22 UTC (permalink / raw) To: Joe Perches, Greg Kroah-Hartman Cc: Nishad Kamdar, devel, Forest Bond, linux-kernel On Wed, Feb 06, 2019 at 11:17:35PM -0800, Joe Perches wrote: > On Wed, 2019-02-06 at 17:25 +0100, Greg Kroah-Hartman wrote: > > On Tue, Feb 05, 2019 at 10:59:40AM -0800, Joe Perches wrote: > > > On Tue, 2019-02-05 at 19:44 +0100, Greg Kroah-Hartman wrote: > > > > On Tue, Feb 05, 2019 at 08:36:24PM +0530, Nishad Kamdar wrote: > > > > > This patch corrects the style for SPDX license Identifier in mac.h > > > > > by using "/* */" in place of "//" as per Linux kernel licensing rules. > > > > > Issue found by checkpatch. > > > > > > > > > > Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com> > > > > > --- > > > > > drivers/staging/vt6656/mac.h | 4 ++-- > > > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > > > > > diff --git a/drivers/staging/vt6656/mac.h b/drivers/staging/vt6656/mac.h > > > > > index 94e700fcd0b6..75166020f7c6 100644 > > > > > --- a/drivers/staging/vt6656/mac.h > > > > > +++ b/drivers/staging/vt6656/mac.h > > > > > @@ -1,5 +1,5 @@ > > > > > -// SPDX-License-Identifier: GPL-2.0+ > > > > > -/* > > > > > +/* SPDX-License-Identifier: GPL-2.0+ > > > > > > > > Should really be: > > > > > > > > /* SPDX-License-Identifier: GPL-2.0+ */ > > > > > > There's a fair number of style inconsistencies in the kernel > > > sources for that already. > > > > > > ~8% of the .h files that have an 'SPDX-License-Identifier:' > > > don't use the recommended style. > > > > > > $ git grep -h "SPDX-License" -- '*.h' | \ > > > perl -p -e 's@Identifier:.*\*/*@Identifier: ... */@; s@Identifier: [^\.].*@Identifier:@' | \ > > > sort | uniq -c | sort -rn > > > 8506 /* SPDX-License-Identifier: ... */ > > > 593 // SPDX-License-Identifier: > > > 154 /* SPDX-License-Identifier: > > > 53 * SPDX-License-Identifier: > > > 1 * SPDX-License-Identifier: GPL-2.0 > > > 1 //SPDX-License-Identifier: > > > 1 /* SPDX-License-Identifier: ... */ > > > > Then let's fix them, the documentation says what the correct format is, > > there's no reason we can't actually follow what is written... > > So here's a script that does most all of them except > the 50 or so that use the SPDX-License-Identifier > in the middle of a comment block. > > Using: > > $ git grep --name-only 'SPDX-License-Identifier:' -- '*.h' | \ > xargs grep -L '/\* SPDX-License-Identifier:.*\*/'| \ > while read file ; do perl -i update_spdx.perl $file ; done > > produces > > $ git diff --shortstat > 748 files changed, 902 insertions(+), 902 deletions(-) > > And > > $ git grep -h "SPDX-License" -- '*.h' | \ > perl -p -e 's@Identifier:.*\*/*@Identifier: ... */@; s@Identifier: [^\.].*@Identifier:@' | \ > sort | uniq -c | sort -rn > 9254 /* SPDX-License-Identifier: ... */ > 53 * SPDX-License-Identifier: > 1 * SPDX-License-Identifier: GPL-2.0 > 1 /* SPDX-License-Identifier: ... */ > > and the perl script below is also attached > > $ cat update_spdx.perl > local $/; > my $file = (<>); > > my $spdx_regex = '/\*[ \t]*SPDX-License-Identifier:[ \t]*'; > my $spdx_actual = '/* SPDX-License-Identifier: '; > > # any // use converted to /* ... */ > $file =~ s@^//[ \t]*SPDX-License-Identifier:[ \t]*(.*)\n@/* SPDX-License-Identifier: $1 */\n@; > > # first line use with /* without trailing */ gets */ added and 2nd line updated > $file =~ m@^\s*${spdx_regex}([^\n]+)\n@; > if (defined $1 && $1 !~ m@\*/$@) { > $file =~ s@^[ \t]*${spdx_regex}([^\n]+)\n@${spdx_actual}$1 */\n/* @; > $file =~ s@^[ \t]*${spdx_regex}([^\n]+)\n[ \t]*/\*[ \t]+\*@${spdx_actual}$1\n/* @; > $file =~ s@^\s*${spdx_regex}([^\n]+)\n/\* \n@${spdx_actual}$1\n/*\n@; > } > > print $file; > Ok, Thanks for the suggestion and the script. I'll try to use it and correct the format. Thanks and regards, Nishad ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] staging: vt6656: Use the correct style for SPDX license Identifier 2019-02-05 18:44 ` Greg Kroah-Hartman 2019-02-05 18:59 ` Joe Perches @ 2019-02-12 15:09 ` Nishad Kamdar 1 sibling, 0 replies; 7+ messages in thread From: Nishad Kamdar @ 2019-02-12 15:09 UTC (permalink / raw) To: Greg Kroah-Hartman; +Cc: Forest Bond, devel, linux-kernel On Tue, Feb 05, 2019 at 07:44:31PM +0100, Greg Kroah-Hartman wrote: > On Tue, Feb 05, 2019 at 08:36:24PM +0530, Nishad Kamdar wrote: > > This patch corrects the style for SPDX license Identifier in mac.h > > by using "/* */" in place of "//" as per Linux kernel licensing rules. > > Issue found by checkpatch. > > > > Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com> > > --- > > drivers/staging/vt6656/mac.h | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/staging/vt6656/mac.h b/drivers/staging/vt6656/mac.h > > index 94e700fcd0b6..75166020f7c6 100644 > > --- a/drivers/staging/vt6656/mac.h > > +++ b/drivers/staging/vt6656/mac.h > > @@ -1,5 +1,5 @@ > > -// SPDX-License-Identifier: GPL-2.0+ > > -/* > > +/* SPDX-License-Identifier: GPL-2.0+ > > Should really be: > > /* SPDX-License-Identifier: GPL-2.0+ */ > > thanks, > > greg k-h Ok, i'll modify it. Thanks for the review. Regards, Nishad ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-02-13 14:22 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-02-05 15:06 [PATCH] staging: vt6656: Use the correct style for SPDX license Identifier Nishad Kamdar 2019-02-05 18:44 ` Greg Kroah-Hartman 2019-02-05 18:59 ` Joe Perches 2019-02-06 16:25 ` Greg Kroah-Hartman 2019-02-07 7:17 ` Joe Perches 2019-02-13 14:22 ` Nishad Kamdar 2019-02-12 15:09 ` Nishad Kamdar
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.