Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp24959imj; Wed, 6 Feb 2019 23:19:58 -0800 (PST) X-Google-Smtp-Source: AHgI3IYXl6RkrXHjuoUQ/lFoHHgZ+lpQrW3nSx/U0nFOK17ODP5YRVv4OzAvEyn7Y+qyyqdNTvUq X-Received: by 2002:a17:902:bc83:: with SMTP id bb3mr193696plb.266.1549523998732; Wed, 06 Feb 2019 23:19:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549523998; cv=none; d=google.com; s=arc-20160816; b=vwiNQ5TExYGDhglxYmnjwSRLrbHva6s4KWA/REwZXdy2A8FViBfqCKXwgQF9R5l4r+ asi2D+xuFVzkRKoF5SzobztW8pYMrUY07YZN+UUJMyzVGc57tJ7kOQTC9IAdhC88Bsk+ Avhtm9Xve3yh/MUuRFJfnr6wpVsxYCVmgkBctI70DlolHO8LdebhgfrjD1arvhfpWvGs FbACPYH/UzK4wcKgMu64tZeaCWabeKLIsurEuzBTVnPMzfjsA/m55jGfSHkISa7iIMwk vgoUEWE+xA6VYHUDEkPxOoir2Y4rNvS5pTjjInFDmw381tTE034AKKRYutEHvV4kXJXZ I8rQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:date:cc:to:from:subject:message-id; bh=YAnxdKRbw4kyRyUmJTlb+V7PRU9O38mXMBCD8bYm+5Q=; b=YE5rIZAUqn7KgXKIXHuozyDNsDU3vTHdvGylrA1oXIbjlkI4A1MYcHgOwZ8McesX/B QHgFaj6PEzZbW2oCfZIZhDKTyBTCiU6A1LEZ/7tfNvKy/kd+IX3ss0HySdqztNc1xFDw p1qW4TqXmO6iXNO2SGVpc4JtJobxFgvn0F+Z0zcvD8VNrVAPcqGCMSs5669vAFVV1tro nWv+zJaRgF2rVCj+xdpcnrITL06Bu77jfOQej7NYMt2H8r2ecRTvp0sav/Z7FtlG5/NM qIQaV/8kcO4Ckpj5DODuxaLmEWEwi9mZxCIiI5Nc12T+JxZxqnNxaIlZk/wvUCz1KWuX F66g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f21si7598212pgb.371.2019.02.06.23.19.43; Wed, 06 Feb 2019 23:19:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726733AbfBGHRn (ORCPT + 99 others); Thu, 7 Feb 2019 02:17:43 -0500 Received: from smtprelay0158.hostedemail.com ([216.40.44.158]:43605 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725923AbfBGHRn (ORCPT ); Thu, 7 Feb 2019 02:17:43 -0500 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay01.hostedemail.com (Postfix) with ESMTP id 5EC0F100E86C3; Thu, 7 Feb 2019 07:17:41 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::,RULES_HIT:41:355:379:599:800:871:960:973:982:988:989:1000:1260:1313:1314:1345:1359:1437:1461:1516:1518:1535:1543:1575:1594:1605:1711:1730:1747:1764:1777:1792:2197:2199:2393:2553:2559:2562:2895:3138:3139:3140:3141:3142:3622:3653:3865:3866:3867:3868:3870:3871:3874:4250:4321:4605:5007:6117:6506:6747:6748:7281:7514:7901:7903:7909:10004:10394:10400:10848:11232:11604:11658:11914:12043:12295:12296:12555:12731:12737:12740:12895:12986:13160:13161:13229:13439:14181:14659:14721:21080:21221:21433:21451:21611:21627:21789:30034:30054:30090:30091,0,RBL:47.151.153.53:@perches.com:.lbl8.mailshell.net-62.8.0.100 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:29,LUA_SUMMARY:none X-HE-Tag: crib50_7d2e405754e2e X-Filterd-Recvd-Size: 5742 Received: from XPS-9350.home (unknown [47.151.153.53]) (Authenticated sender: joe@perches.com) by omf03.hostedemail.com (Postfix) with ESMTPA; Thu, 7 Feb 2019 07:17:39 +0000 (UTC) Message-ID: <65ceabf611b845b5d278dba73d30f16b33e10d6d.camel@perches.com> Subject: Re: [PATCH] staging: vt6656: Use the correct style for SPDX license Identifier From: Joe Perches To: Greg Kroah-Hartman Cc: Nishad Kamdar , devel@driverdev.osuosl.org, Forest Bond , linux-kernel@vger.kernel.org Date: Wed, 06 Feb 2019 23:17:35 -0800 In-Reply-To: <20190206162524.GA22989@kroah.com> References: <20190205150620.GA17522@nishad> <20190205184431.GD22198@kroah.com> <7771453cf380ce43d906f6648edecd8b58fec38a.camel@perches.com> <20190206162524.GA22989@kroah.com> Content-Type: multipart/mixed; boundary="=-Qr+OWaOSwYco/TihXJhf" User-Agent: Evolution 3.30.1-1build1 Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-Qr+OWaOSwYco/TihXJhf Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit 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 > > > > --- > > > > 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; --=-Qr+OWaOSwYco/TihXJhf Content-Type: application/x-perl; name="update_spdx.perl" Content-Disposition: attachment; filename="update_spdx.perl" Content-Transfer-Encoding: base64 bG9jYWwgJC87Cm15ICRmaWxlID0gKDw+KTsKCm15ICRzcGR4X3JlZ2V4ID0gJy9cKlsgXHRdKlNQ RFgtTGljZW5zZS1JZGVudGlmaWVyOlsgXHRdKic7Cm15ICRzcGR4X2FjdHVhbCA9ICcvKiBTUERY LUxpY2Vuc2UtSWRlbnRpZmllcjogJzsKCiMgYW55IC8vIHVzZSBjb252ZXJ0ZWQgdG8gLyogLi4u ICovCiRmaWxlID1+IHNAXi8vWyBcdF0qU1BEWC1MaWNlbnNlLUlkZW50aWZpZXI6WyBcdF0qKC4q KVxuQC8qIFNQRFgtTGljZW5zZS1JZGVudGlmaWVyOiAkMSAqL1xuQDsKCiMgZmlyc3QgbGluZSB1 c2Ugd2l0aCAvKiB3aXRob3V0IHRyYWlsaW5nICovIGdldHMgKi8gYWRkZWQgYW5kIDJuZCBsaW5l IHVwZGF0ZWQKJGZpbGUgPX4gbUBeXHMqJHtzcGR4X3JlZ2V4fShbXlxuXSspXG5AOwppZiAoZGVm aW5lZCAkMSAmJiAkMSAhfiBtQFwqLyRAKSB7CiAgICAkZmlsZSA9fiBzQF5bIFx0XSoke3NwZHhf cmVnZXh9KFteXG5dKylcbkAke3NwZHhfYWN0dWFsfSQxICovXG4vKiBAOwogICAgJGZpbGUgPX4g c0BeWyBcdF0qJHtzcGR4X3JlZ2V4fShbXlxuXSspXG5bIFx0XSovXCpbIFx0XStcKkAke3NwZHhf YWN0dWFsfSQxXG4vKiBAOwogICAgJGZpbGUgPX4gc0BeXHMqJHtzcGR4X3JlZ2V4fShbXlxuXSsp XG4vXCogXG5AJHtzcGR4X2FjdHVhbH0kMVxuLypcbkA7Cn0KCnByaW50ICRmaWxlOwo= --=-Qr+OWaOSwYco/TihXJhf--