Linux-SPDX Archive on lore.kernel.org
 help / color / Atom feed
From: Joe Perches <joe@perches.com>
To: "Zavras, Alexios" <alexios.zavras@intel.com>,
	Thomas Gleixner <tglx@linutronix.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"linux-spdx@vger.kernel.org" <linux-spdx@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Masahiro Yamada <yamada.masahiro@socionext.com>
Subject: Re: spdxcheck.py complains about the second OR?
Date: Tue, 05 Nov 2019 07:10:52 -0800
Message-ID: <ec20c751ac1e4156aca0b02dfa0cef4b70cb8ec5.camel@perches.com> (raw)
In-Reply-To: <CY4PR1101MB2360AB7647D9E2FA15044EE4897E0@CY4PR1101MB2360.namprd11.prod.outlook.com>

On Tue, 2019-11-05 at 10:11 +0000, Zavras, Alexios wrote:
> This is not correct.
> Since the grammar includes the production "expr: expr OR expr",
> there is absolutely no need to add a rule with more than two operands --
> it will be handled recursively.

You sure about the recursion?

It does work and spdxcheck no longer emits a message for
these two files.

> -- zvr
> 
> -----Original Message-----
> From: linux-spdx-owner@vger.kernel.org <linux-spdx-owner@vger.kernel.org> On Behalf Of Joe Perches
> Sent: Monday, 4 November, 2019 23:24
> To: Thomas Gleixner <tglx@linutronix.de>; Masahiro Yamada <yamada.masahiro@socionext.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>; linux-spdx@vger.kernel.org; Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
> Subject: Re: spdxcheck.py complains about the second OR?
> 
> On Mon, 2019-11-04 at 23:11 +0100, Thomas Gleixner wrote:
> > On Fri, 1 Nov 2019, Masahiro Yamada wrote:
> > > scripts/spdxcheck.py warns the following two files.
> > > 
> > > $ ./scripts/spdxcheck.py
> > > drivers/net/ethernet/pensando/ionic/ionic_if.h: 1:52 Syntax error: 
> > > OR
> > > drivers/net/ethernet/pensando/ionic/ionic_regs.h: 1:52 Syntax error: 
> > > OR
> > > 
> > > I do not understand what is wrong with them.
> > > 
> > > I think "A OR B OR C" is sane.
> > 
> > Yes it is, but obviously we did not expect files with 3 possible 
> > alternative licenses.
> 
> Perhaps just this, but the generic logic obviously isn't complete.
> ---
>  scripts/spdxcheck.py | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/scripts/spdxcheck.py b/scripts/spdxcheck.py index 6374e0..00be34 100755
> --- a/scripts/spdxcheck.py
> +++ b/scripts/spdxcheck.py
> @@ -150,6 +150,7 @@ class id_parser(object):
>                  | ID WITH EXC
>                  | expr AND expr
>                  | expr OR expr
> +                | expr OR expr OR expr
>                  | LPAR expr RPAR'''
>          pass
>  
> 
> 
> Intel Deutschland GmbH
> Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
> Tel: +49 89 99 8853-0, www.intel.de
> Managing Directors: Christin Eisenschmid, Gary Kershaw
> Chairperson of the Supervisory Board: Nicole Lau
> Registered Office: Munich
> Commercial Register: Amtsgericht Muenchen HRB 186928
> 


  reply index

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-01  4:25 Masahiro Yamada
2019-11-04 22:11 ` Thomas Gleixner
2019-11-04 22:24   ` Joe Perches
2019-11-05 10:11     ` Zavras, Alexios
2019-11-05 15:10       ` Joe Perches [this message]
2019-11-11  9:37         ` Zavras, Alexios
2019-11-05 15:47     ` Christoph Hellwig
2019-11-04 23:53   ` Christoph Hellwig
     [not found]     ` <CAG_66ZQ3f39bv=0Yw=Eum0vcxbf94mmXE9jdJUpi6+gEEqkS8A@mail.gmail.com>
2019-11-05 14:28       ` Christoph Hellwig

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ec20c751ac1e4156aca0b02dfa0cef4b70cb8ec5.camel@perches.com \
    --to=joe@perches.com \
    --cc=alexios.zavras@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spdx@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-SPDX Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-spdx/0 linux-spdx/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-spdx linux-spdx/ https://lore.kernel.org/linux-spdx \
		linux-spdx@vger.kernel.org
	public-inbox-index linux-spdx

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-spdx


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git