All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	Simon Horman <horms+renesas@verge.net.au>,
	Yoshinori Sato <ysato@users.sourceforge.jp>,
	Rich Felker <dalias@libc.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Kate Stewart <kstewart@linuxfoundation.org>,
	Jonathan Corbet <corbet@lwn.net>
Subject: Re: [patch 2/2] scripts/spdxcheck.py: Handle special quotation mark comments
Date: Wed, 16 Jan 2019 16:38:23 +0100	[thread overview]
Message-ID: <20190116153823.GB871@kroah.com> (raw)
In-Reply-To: <20190116104127.698565432@linutronix.de>

On Wed, Jan 16, 2019 at 11:26:53AM +0100, Thomas Gleixner wrote:
> The SuperH boot code files use a magic format for the SPDX identifier
> comment:
> 
>   LIST "SPDX-License-Identifier: .... "
> 
> The trailing quotation mark is not stripped before the token parser is
> invoked and causes the scan to fail. Handle it gracefully.
> 
> Fixes: 6a0abce4c4cc ("sh: include: convert to SPDX identifiers")
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> Cc: Simon Horman <horms+renesas@verge.net.au>
> Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
> Cc: Rich Felker <dalias@libc.org>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Kate Stewart <kstewart@linuxfoundation.org>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Jonathan Corbet <corbet@lwn.net>
> ---
>  scripts/spdxcheck.py |    8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> --- a/scripts/spdxcheck.py
> +++ b/scripts/spdxcheck.py
> @@ -175,7 +175,13 @@ import os
>                  self.lines_checked += 1
>                  if line.find("SPDX-License-Identifier:") < 0:
>                      continue
> -                expr = line.split(':')[1].replace('*/', '').strip()
> +                expr = line.split(':')[1].strip()
> +                # Remove trailing comment closure
> +                if line.startswith('/*'):
> +                    expr = expr.rstrip('*/').strip()
> +                # Special case for SH magic boot code files
> +                if line.startswith('LIST \"'):
> +                    expr = expr.rstrip('\"').strip()
>                  self.parse(expr)
>                  self.spdx_valid += 1
>                  #
> 
> 

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

  reply	other threads:[~2019-01-16 15:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-16 10:26 [patch 0/2] LICENSES: Fix fallout from recent SPDX conversions Thomas Gleixner
2019-01-16 10:26 ` [patch 1/2] LICENSES: Add GCC runtime library exception text Thomas Gleixner
2019-01-16 15:36   ` Greg Kroah-Hartman
2019-01-16 10:26 ` [patch 2/2] scripts/spdxcheck.py: Handle special quotation mark comments Thomas Gleixner
2019-01-16 15:38   ` Greg Kroah-Hartman [this message]
2019-01-20 15:32   ` Sven Eckelmann
2019-01-20 15:32     ` [B.A.T.M.A.N.] " Sven Eckelmann
2019-01-20 18:39     ` Joe Perches
2019-01-20 18:39       ` [B.A.T.M.A.N.] " Joe Perches
2019-02-06 18:50       ` Sven Eckelmann
2019-02-06 18:50         ` [B.A.T.M.A.N.] " Sven Eckelmann
2019-01-16 21:56 ` [patch 0/2] LICENSES: Fix fallout from recent SPDX conversions Jonathan Corbet

Reply instructions:

You may reply publicly 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=20190116153823.GB871@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=corbet@lwn.net \
    --cc=dalias@libc.org \
    --cc=horms+renesas@verge.net.au \
    --cc=kstewart@linuxfoundation.org \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=ysato@users.sourceforge.jp \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.