Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1023791imm; Fri, 15 Jun 2018 09:56:53 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKNP1alfdFm/O3MVkZTAqRSOadzqxRYK4xiLIWxaPTQ+freMVL+wqWxDX88CzFEZD/Z3MzE X-Received: by 2002:a63:3201:: with SMTP id y1-v6mr2343814pgy.419.1529081813156; Fri, 15 Jun 2018 09:56:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529081813; cv=none; d=google.com; s=arc-20160816; b=nImBCsNS5THfgE6cCx/swpxaPEpht+Xk/8nHygXZiywXcadqflSaiDbMgOKPcmWCFG l/N0Xd484YpasKT7GKGnIJ82ITYj4khBc5CXsbUH8TTA4Faa5EyrrkuybIsU2f/Vvrby vEWrfh8NnVDkZ+81hrFnPUoL24/fdegazY3fW4utD2PM2xtrWxN1avnRc4OkUtcsY/rj zovJYUC1c3ya45MbaYGu6hS6wYTjkqTJRtpErMJh0StgzZG/MXxA+mLevxjpjHWgjA32 dTYOqopORanvrA7vkEq1Q4PkjlRFJUDckzorWl0QvTjSMmp0/gy/2bjrIrGB4edwqWRU 37EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=llWdQfbg81SZfMzu6lFYXVcWDTvb7NKuzb2Z5HrFs/c=; b=kGyjgqP17+cIe05CLwiEcsL4FjZA6RSu8r7IhUceVl2oN6nqTpEmvNLREAEP06JTNw GtAoSDKcpFl75XirLxhzI3Bi8AZT72pOYzT7/0YjNK6pxK2/+8ceqO7RNpJUcpGCIIwY QtSlR1oIRt5nsce9vtJPNIyGT67dR11Mc39CcSN7GhhcSySxfUEEpW7IrFskpZPTfLW3 nTUf6+Muy2a7NqvBCn1OIa9H4SzjctM5TlmZUFfMtZDY+EKsIRJD6IVWvndW1DzMDr/w p5NMony41KE6umWev8Ql7DIp1EXy5a8jhRHmEdIIMfDskKgqTSJKhdrfsiiwKQcblzU0 xOYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HPfTsogB; 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 x70-v6si7065394pgx.576.2018.06.15.09.56.38; Fri, 15 Jun 2018 09:56:53 -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=pass header.i=@gmail.com header.s=20161025 header.b=HPfTsogB; 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 S1756273AbeFOQzX (ORCPT + 99 others); Fri, 15 Jun 2018 12:55:23 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:40285 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755310AbeFOQzV (ORCPT ); Fri, 15 Jun 2018 12:55:21 -0400 Received: by mail-it0-f67.google.com with SMTP id 188-v6so3579105ita.5; Fri, 15 Jun 2018 09:55:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=llWdQfbg81SZfMzu6lFYXVcWDTvb7NKuzb2Z5HrFs/c=; b=HPfTsogBqkQ28tgNuzIXyToNTxYkPY392l3PmFPXPjF0/0y0hUDTinXNu49tbASWRo 2s6ydJinvEGmlPgpjoZhrAyxe+qWFbeVJbpbRp93xZ202QiR11pdjngbXculcqB9ofrd VfEorDXRyBEzTj+kIzPQ85Socz0C/L4l9onyg6eeQEbiMsJrQIdn8/+EMG4DWqhR4wVa HCI7rA8iQJYzESQNF9qlw1VAd8fseo1pteqgJYfSp8VUe8Q+7jKOTsSjYIFXM/UxsFjo SngZ/OVu9DQAitjzUm0O5mDe32a5cCvo0TqPYqsTyjQxYVG6JJ8hTf9mXxM9DtHzi+74 mX+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=llWdQfbg81SZfMzu6lFYXVcWDTvb7NKuzb2Z5HrFs/c=; b=cuWHRtRNy+QRNlXK+/j2DvszA80WpaSmJQ4InXzTusCWy8+OLR+ROYUoAAe3wTd8iB WF5q6/U/iW9jf8g9rAQplztJBKhiXEdul41j3VtLxUaa+v9R3lhuXqr+Ta0yO+4pda9r 2xcK69B1k19rJLj0YtFnBnW1pm2hjegXhFXynrTOKOFgtnOVUuD0IpRML292Ts2u2Bx5 U0MiMMNPStp9Ik59zJl0/GasSqOU6S5SJT3gLt0S2Rj4z3LPudKuZ7FouaIu2IlEMkQA xv481ZCaxMmKGS9v6a2vgrfb+4a/LdWCTIVoe9Wl+v96WSDRUPRH7boihpnH79ogZ5fe DTcQ== X-Gm-Message-State: APt69E02/UBT+EjYHcZIOUVwvQH7niwSOJ0CFaZciP/IH92GGyEvuNso ZYC6lKlF+bM5No7TuYXfEmsdDkuTVufpqOj+y3I= X-Received: by 2002:a24:2f12:: with SMTP id j18-v6mr2007035itj.28.1529081720642; Fri, 15 Jun 2018 09:55:20 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:7b26:0:0:0:0:0 with HTTP; Fri, 15 Jun 2018 09:55:20 -0700 (PDT) In-Reply-To: References: <20171228152710.891701433@linutronix.de> <20171228153308.286787253@linutronix.de> From: Yang Li Date: Fri, 15 Jun 2018 11:55:20 -0500 Message-ID: Subject: Re: [patch V5 01/11] Documentation: Add license-rules.rst to describe how to properly identify file licenses To: Thomas Gleixner Cc: LKML , Linus Torvalds , Andrew Morton , Jonathan Corbet , Kate Stewart , Philippe Ombredanne , Greg Kroah-Hartman , Christoph Hellwig , Russell King , Rob Herring , Jonas Oberg , Joe Perches , linux-xfs@vger.kernel.org, Charlemagne Lasse , Carmen Bianca Bakker , "Darrick J. Wong" , Heiko Carstens Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 12, 2018 at 2:27 PM, Thomas Gleixner wrote: > Yang, > > On Tue, 12 Jun 2018, Yang Li wrote: >> On Thu, Dec 28, 2017 at 4:17 PM, Thomas Gleixner wrote: >> > On Thu, 28 Dec 2017, Thomas Gleixner wrote: >> > >> > Sorry for the spam. I somehow missed to refresh the patch before generating >> > the mbox. Find below the correct version of that one which has ALL braces >> > removed which we don't need. > >> I'm not sure how we reached the conclusion that we should remove ALL >> braces? I cannot find related discussion in the archive except for >> the "WITH" case. > > https://lkml.kernel.org/r/CAOFm3uEpM_tBErkOvqghcy+wbw0i4mSnafPBRC3HYZVQjsSyMw@mail.gmail.com Thanks Thomas, But this email is mostly discussing the "WITH" case as I said, and it does mentioned that braces is (weakly) needed for other cases. > >> This is conflicting with the current SPDX spec at >> https://spdx.org/spdx-specification-21-web-version quoted below and >> also the explenation in your own file. >> >> Quote from SPDX spec 2.1: More expressive composite license >> expressions can be constructed using "OR", "AND", and "WITH" operators >> similar to constructing mathematical expressions using arithmetic >> operators. For the Tag:value format, any license expression that >> consists of more than one license identifier and/or LicenseRef, should >> be encapsulated by parentheses: "( )". > > This is not relevant here: > > For the Tag:value format, ..... > > The kernel does not generate SPDX files in Tag:value format. The kernel > uses SPDX license identifiers to reflect the actual license of a file. I'm not sure if I understood the Tag:value term correctly. But it looks like to me that the "SPDX-License-Identifier: " is a tag:value in the SPDX spec. "The tag should appear on its own line in the source file, generally as part of a comment. SPDX-License-Identifier: " > >> > + A is either an SPDX short form license >> > + identifier found on the SPDX License List, or the combination of two >> > + SPDX short form license identifiers separated by "WITH" when a license >> > + exception applies. When multiple licenses apply, an expression consists >> > + of keywords "AND", "OR" separating sub-expressions and surrounded by >> > + "(", ")" . >> >> Conflicting with the example > > No, The keyword is 'separating sub-expressions'. It does not say license > identifiers. But the first sentense declared that an expression can just be a short form license identifier. And the examples provided in the spec also proves it: "Examples: SPDX-License-Identifier: (GPL-2.0 OR MIT) SPDX-License-Identifier: (LGPL-2.1 AND BSD-2-CLAUSE) SPDX-License-Identifier: (GPL-2.0+ WITH Bison-exception-2.2)" > > So these examples are completely compliant with the documentation: > >> > + // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note >> > + // SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note >> > + // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause > > Two license (exception) identifiers plus a operator. That's perfectly well > defined. > >> > + // SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) OR MIT > > This is actually a case where you need parentheses and they separate the > sub-expression 'ID with EXC'. > > Adding extra parentheses around any simple 'ID operator [ID|EXC]' > expression is really overkill and does not make stuff more > readable. Likewise in programming languages. Why would anyone write: > > C et al.: a = (b || c); > Pyhton: a = (b and c) I think I agree with you that not having parentheses in these cases probably make more sense. But I think we are having a conflict with the spec now, probably we should update the SPDX spec to be aligned? Actually a lot of the current SPDX tags in kernel tree are following the spec to use the parentheses. We should do something to avoid the confusion in the future IMO. Regards, Leo