Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp218058imj; Wed, 13 Feb 2019 07:14:16 -0800 (PST) X-Google-Smtp-Source: AHgI3IZhZrP90wOf+6O6O3yJIQkCJccDuHK4KpWTUmH2HF5IZhk+6SrgglcpM6KohZtgrxQHzc8a X-Received: by 2002:a63:360b:: with SMTP id d11mr907960pga.156.1550070856107; Wed, 13 Feb 2019 07:14:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550070856; cv=none; d=google.com; s=arc-20160816; b=ysZYhV4+eG0G8S4c4TJMj+TXzN8lUsAJ6i9Zn9qjEPwFJdJAE1rykryMiN0RJ/Hk/6 MmTJFG2GUrgqexFdaofXC9DiAz3R15C8G5JPOPUeRmtdUZeoQXuku0n79EWNgHpq3uEP mYV4mBs085pAVaO7Xyj8OH8pvGNaNhjc632jrX1a6MuZQ2qNhDmZL5BVMdKq9REMsFg9 CrifPB5YBtTKRb/tS0VbBRb55Trglx0egsXNj7aomjbxsk80bSrF0hoXwI1XXeWuUIw/ wP2kPhME5cFGyEImUu5cgJz3aAMw2hNeIBH+37e43//W4O8ZEhSShvw0WBPWuXeEeFet yzMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=VINywaqVsx/SKlGROTtYFcWn3xoANGvVCBKY156P9Bw=; b=Tslw/9omEDtEv2B6BBkhyUK2F7aVrZGuZjE5YnhLXW/GQspt22cFhLwfMHP47+ddQ1 AjGbwWG8R76Rgvw+mNUxBfGpZD7Oe/WPajr/Dx1kaFQBtQv/54EygdO75ffA4ILUbKmC M7KbmAqGzq3qE7z9aSnMEMV3XykMH5gqZxNgmKx3Wf+bVBqu5WpN7XQWDMR1HXma/3cG CoCJSlalH3BhBcfEAnUiHcZWIS23a2p+mfZz4S/KV/EBhjZSANZE3/Rn530uqWy9DSeO Gv3Zs/HYksSZUq3dt5WRzZEE2nzLeiqLFQfG2CzNi071TrtqIAiwzmOhQc1db5n+GpUL BDEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="gMPY/j4O"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d10si14352425pgv.14.2019.02.13.07.13.59; Wed, 13 Feb 2019 07:14:16 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b="gMPY/j4O"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732927AbfBMOWM (ORCPT + 99 others); Wed, 13 Feb 2019 09:22:12 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:35964 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730572AbfBMOWM (ORCPT ); Wed, 13 Feb 2019 09:22:12 -0500 Received: by mail-pg1-f194.google.com with SMTP id r124so1206336pgr.3 for ; Wed, 13 Feb 2019 06:22:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=VINywaqVsx/SKlGROTtYFcWn3xoANGvVCBKY156P9Bw=; b=gMPY/j4O6QISOewjTOOITqfv2oM8hqwdPSVDAyLiwWjIqYao7rJwXRM9OWfvEe7GvX 6qsMB0KKsovapU5TwqlRKPx81F9j75ku2JtSNk66JrTla97sbgkLciGpWdR2ndZsSRn+ v2xsNUQ18ffuYhKtvSAaFRWjyVkqwXI9kHKBsXiWHsgebf+YyMDCJF/tcwp+6doi8tYy 3BeFQzcsa85PgsoNNHWzxBeYaG5qdsSLRo9g+l3pjKQGXIBTvJEN5FWU2ufxev9XtooE mLZQLYuszuQqhliME7s3qBCDAFg8/qtDLoMMlGDBZNoPuH/yDPdbMU+m+ts4JOrMdE8Q E8zQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=VINywaqVsx/SKlGROTtYFcWn3xoANGvVCBKY156P9Bw=; b=PdNlxKMotxI+S57ovhERerVf75ymPsQqHCY8hR4E3I/G35B1zAYsJ1Q/9A8lO7Hz+b rDKp3mVodVpU5ZdOVnXcBL3Xr1SeIxrdc+8SmyJ3BlETnJl1en7+9MLHHpyxAOovqh8s VG2seXlqIMH2Ypmwuo3FCrpZII6SAPcK/84+DMcVQMovi1At1IhaFPbihYth2BkqlIS+ AnGiMCLuiAyzc6zx4+jYkb7ZYuxbdHRD85voGrPSgSOR6VB2coTRdvmz4WsI8xZznsx1 11ZSCflGHUig0T+I4iHz9c6+Spp13XavU6ogVgw+4slcjJRq34VyJVTgHtimaL4HwUC2 hekA== X-Gm-Message-State: AHQUAuYOdDDVKwZOGJFH7tlhXGgo61I/XIeXd5i6z8kAGEcFoG9HTLdu p8RALzeeypqv5cMs3uNYXofB0VMc X-Received: by 2002:a62:4389:: with SMTP id l9mr795861pfi.170.1550067731071; Wed, 13 Feb 2019 06:22:11 -0800 (PST) Received: from nishad ([106.51.25.107]) by smtp.gmail.com with ESMTPSA id 15sm24800013pfr.55.2019.02.13.06.22.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Feb 2019 06:22:10 -0800 (PST) Date: Wed, 13 Feb 2019 19:52:01 +0530 From: Nishad Kamdar To: Joe Perches , Greg Kroah-Hartman Cc: Nishad Kamdar , devel@driverdev.osuosl.org, Forest Bond , linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: vt6656: Use the correct style for SPDX license Identifier Message-ID: <20190213142159.GA4512@nishad> References: <20190205150620.GA17522@nishad> <20190205184431.GD22198@kroah.com> <7771453cf380ce43d906f6648edecd8b58fec38a.camel@perches.com> <20190206162524.GA22989@kroah.com> <65ceabf611b845b5d278dba73d30f16b33e10d6d.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <65ceabf611b845b5d278dba73d30f16b33e10d6d.camel@perches.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > > > > --- > > > > > 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