Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp605589ybe; Thu, 5 Sep 2019 03:04:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqx8PJd2JOCN3El7JtttaPXgqfZVjbqAl9pFBzzq/p463LUr+PK6GXWvt7k3MxLkdxDAELJ0 X-Received: by 2002:a17:90a:3d03:: with SMTP id h3mr2983554pjc.49.1567677884726; Thu, 05 Sep 2019 03:04:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567677884; cv=none; d=google.com; s=arc-20160816; b=CO9N8UZbUZSSrq0vWeWlQR3yliG2cs/MEYUFAkj2Lpxhz+nOp42Ejmmwd7Hf/0ueBm N77i7D6f3s7jQ/dmSQ8zrcN4i7bu10Wz64K9HgHEUxGT/iO+YNGOgqXskBOYDbEky3sI fa10MTYJYOOO0IqOUA/fA/oHPMmAs9Q07jz8eQwIKWsYzLqwczpR/BZDVpsgDC6oLxoo buEeWzF/UCF2lfWIh0QOxox0Clv5t4kEeiyBLATTNvYre4NIkrAbIWaaRt08fkDTt6NH oYPdMOmBjHJZV2KXoEelDtbojOs6XwQvMjWKyY5jAYuMv+1/uHTaM2orjK9PykOe8vCg Utbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=46bdmJAj05c8cmX9LGKLrze0o9OvutSp9qj+K6a1Is8=; b=tnYVhNbNl7YmG5GXIq3ZzHZhmu3NuySLF7hd6NlcXlvncM4HSP8g4brgDKYUmkyOd/ 3CO/YJ0R8hPT14r8YPIU9uyXQG+5zgHnF+WtAK5pvigtaYP3t3nO9LV3O+uSDBvuyuHS NCPGNzFCaIfd6eMdQPN4x+7cShR/NCFDnKCVwhUubdJbb24Q+euN/wC4xqV8OlYF5uN1 9F+rbROyv/sW5qHRl2IuNQwD98gRahcwoNVIHaKpUbvycBZhec9Zt6jyCVRkY47bKEXh xfWnCy6/zuKSsIspUlvHcnLS8FRhVO//STs7ngioj/FeEG86WmY2Yu8rwzw6x47ZPMT1 rIeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=YBLOP6up; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id em2si1606994pjb.89.2019.09.05.03.04.27; Thu, 05 Sep 2019 03:04:44 -0700 (PDT) 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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=YBLOP6up; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732864AbfIEI4X (ORCPT + 99 others); Thu, 5 Sep 2019 04:56:23 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:38722 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726231AbfIEI4X (ORCPT ); Thu, 5 Sep 2019 04:56:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To: From:Date:Sender:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=46bdmJAj05c8cmX9LGKLrze0o9OvutSp9qj+K6a1Is8=; b=YBLOP6upwBsfS581IJZRplqet 7HQh4n/+Xd+BrX8l0K8FPvZd30p6WjpH7oEei4JoZx9UwScWdae0L8XHnbXFNixaRoMra69o/kESg q6kffmadlQADXTJNq+o5kq4H2eeLzpmFzGYMGuy1Z3DSyqEDqw/agXgFDQs5QmA+5oPyWcyup4ZOw a19ADBDn/CdB2QbYoshkAM+c3rVxynzq6oPcRy5lFhovAGTAQSnIwvC6ZAdUNfIp0THKQPBK+0lg6 X/+8NlfJNyuZ3gf2DKcttOgA0rPiIE2PrkLK2Xbht3ZxaEgEQ9VwqhJ3PNBb3Xm6iG/cc29XzDqGA P8z3gRS/g==; Received: from 177.17.137.173.dynamic.adsl.gvt.net.br ([177.17.137.173] helo=coco.lan) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1i5nYx-0000nv-2V; Thu, 05 Sep 2019 08:56:19 +0000 Date: Thu, 5 Sep 2019 05:56:14 -0300 From: Mauro Carvalho Chehab To: Greg Kroah-Hartman Cc: Nishad Kamdar , Joe Perches , Uwe =?UTF-8?B?S2xlaW5lLUvDtm5pZw==?= , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] media: siano: Use the correct style for SPDX License Identifier Message-ID: <20190905055614.7958918b@coco.lan> In-Reply-To: <20190905055430.GA23826@kroah.com> References: <20190831151147.GA7082@nishad> <20190904153432.7fb54f02@coco.lan> <20190904183608.GA495@kroah.com> <20190904160010.4532c3f5@coco.lan> <20190905055430.GA23826@kroah.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, 5 Sep 2019 07:54:30 +0200 Greg Kroah-Hartman escreveu: > On Wed, Sep 04, 2019 at 04:00:10PM -0300, Mauro Carvalho Chehab wrote: > > Em Wed, 4 Sep 2019 20:36:08 +0200 > > Greg Kroah-Hartman escreveu: > > > > > On Wed, Sep 04, 2019 at 03:34:32PM -0300, Mauro Carvalho Chehab wrote: > > > > Em Sat, 31 Aug 2019 20:41:51 +0530 > > > > Nishad Kamdar escreveu: > > > > > > > > > This patch corrects the SPDX License Identifier style > > > > > in header file related to Siano Mobile Silicon Digital TV. > > > > > For C header files Documentation/process/license-rules.rst > > > > > mandates C-like comments (opposed to C source files where > > > > > C++ style should be used) > > > > > > > > > > Changes made by using a script provided by Joe Perches here: > > > > > https://lkml.org/lkml/2019/2/7/46 > > > > > > > > > > Suggested-by: Joe Perches > > > > > Signed-off-by: Nishad Kamdar > > > > > --- > > > > > drivers/media/common/siano/smsir.h | 2 +- > > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > > > diff --git a/drivers/media/common/siano/smsir.h b/drivers/media/common/siano/smsir.h > > > > > index b2c54c256e86..ada41d5c4e83 100644 > > > > > --- a/drivers/media/common/siano/smsir.h > > > > > +++ b/drivers/media/common/siano/smsir.h > > > > > @@ -1,5 +1,5 @@ > > > > > +/* SPDX-License-Identifier: GPL-2.0+ */ > > > > > /* > > > > > - * SPDX-License-Identifier: GPL-2.0+ > > > > > * > > > > > * Siano Mobile Silicon, Inc. > > > > > * MDTV receiver kernel modules. > > > > > > > > What's wrong with that? The above is a perfectly fine SPDX header. > > > > > > It is not the first line of the file :( > > > > > > > A requirement for having it at the first line is not realistic. > > But it is "the rule" as Joe points out. > > > I'd say more: some script that would check for SPDX only at the > > first line won't work. > > > > The reason is simple: we have some scripts at the Kernel tree. > > This is not a script, for those, it is fine to use the second line, > again, this is documented. > > This isn't new at all, been that way since December of 2017, see commit > aa19a176df95 ("Documentation: Add license-rules.rst to describe how to > properly identify file licenses") It sounds that I somehow misinterpreted this. Ok, be it. I'll accept this patch and keep such rule in mind for next SPDX changes. Anyway, with regards to script, we need to change the rules in order to allow adding SPDX for python scripts, as otherwise the addition of SPDX headers may cause regressions. As mentioned on https://stackoverflow.com/questions/728891/correct-way-to-define-python-source-code-encoding Python's PEP-263 [1] dictates that an script that needs to default to UTF-8 encoding has to follow this rule: 'Python will default to ASCII as standard encoding if no other encoding hints are given. To define a source code encoding, a magic comment must be placed into the source files either as first or second line in the file' And: 'More precisely, the first or second line must match the following regular expression: ^[ \t\f]*#.*?coding[:=][ \t]*([-_.a-zA-Z0-9]+)' [1] https://www.python.org/dev/peps/pep-0263/ If a script has both shebang and the charset encoding line, we can't place a SPDX tag without either violating license-rules.rst or breaking the script by making it crash with non-ASCII characters. I'll submit a separate patch in order to address such issue at license-rules.txt. Thanks, Mauro