From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8FC68C5DF60 for ; Tue, 5 Nov 2019 15:11:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 666C0214D8 for ; Tue, 5 Nov 2019 15:11:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389505AbfKEPLJ (ORCPT ); Tue, 5 Nov 2019 10:11:09 -0500 Received: from smtprelay0110.hostedemail.com ([216.40.44.110]:34173 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389546AbfKEPLI (ORCPT ); Tue, 5 Nov 2019 10:11:08 -0500 Received: from smtprelay.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by smtpgrave08.hostedemail.com (Postfix) with ESMTP id B5DFF182D3EBE for ; Tue, 5 Nov 2019 15:11:06 +0000 (UTC) Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay05.hostedemail.com (Postfix) with ESMTP id CFE671801DC08; Tue, 5 Nov 2019 15:11:04 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: chalk38_6091a4e45df63 X-Filterd-Recvd-Size: 3595 Received: from XPS-9350.home (unknown [47.151.135.224]) (Authenticated sender: joe@perches.com) by omf05.hostedemail.com (Postfix) with ESMTPA; Tue, 5 Nov 2019 15:11:03 +0000 (UTC) Message-ID: Subject: Re: spdxcheck.py complains about the second OR? From: Joe Perches To: "Zavras, Alexios" , Thomas Gleixner Cc: Greg Kroah-Hartman , "linux-spdx@vger.kernel.org" , Linux Kernel Mailing List , Masahiro Yamada Date: Tue, 05 Nov 2019 07:10:52 -0800 In-Reply-To: References: <46615f063c973eee649e3fdb8261978102c89108.camel@perches.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.34.1-2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-spdx-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spdx@vger.kernel.org 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 On Behalf Of Joe Perches > Sent: Monday, 4 November, 2019 23:24 > To: Thomas Gleixner ; Masahiro Yamada > Cc: Greg Kroah-Hartman ; linux-spdx@vger.kernel.org; Linux Kernel Mailing List > 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 >