Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1209669imu; Wed, 16 Jan 2019 14:52:33 -0800 (PST) X-Google-Smtp-Source: ALg8bN7F4mQCtcA0hatTFfaiEkHYQQN6RUiat9IPX9q7o7rN43wdo/1f4w0z9Ke8zl5EVH9OdfBS X-Received: by 2002:a17:902:e10a:: with SMTP id cc10mr12460312plb.165.1547679153744; Wed, 16 Jan 2019 14:52:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547679153; cv=none; d=google.com; s=arc-20160816; b=wsy1ZV3EAjdoog/T3HsVV0ToKPktGsysbJDpIy7H5EnGU1L5xtlOAIb8JW2qIVIPVD yDDmvanzuGUbSYHKjVviCUJoyRxTxqMvT5MhVbYtMKhLAli29law7PfGh7wy0ik7ZGA6 4G2+4RED/lhmfJ27o3NyPsPMIlf2yaua6hCDwHaDVzaie4jtSwYp/mbtoFvfOG8sG16Y He1CxNuWwUbMYekCpjtNp1wWy7VhDSZocPZ/DVn4cRrsSFNU60VVLLxs2d9adkdTyUbN V8HIXC6MalVZHuig9KKDnMmh65hqMzL89bhUcoq5s64Hb/GcUV852tPYn6xz6Ts0A9IS 0Snw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=cN1tIv79dxvfxxr3oBi5uLPrJuKhFFgDn/5ox60S8tg=; b=FLFw83ETWpxkYRHtIkh6H342lEfN3TYK4aoScWGZWZsMyBFfC5iakwmbXnzpLJfi92 aXmjIbc8GR43R/fCQPec8cwP5wz+Z4w5U6HKnwt2JlpKMYAX4ZJ/3G11HGGa7Wyn30lD 3Z6quUNf04DQiy3f69Fbb2hLjx5605kzlWQoycp9ipr8MEqOqg4/j0O3qpfBjqa72Wn2 sQ6Wr2pZgdET6ejqYO0teOZWTxmLTbq2zD4jj+KmMSYtoChCZQGn4+BG0iL0Rkm/wOWE TGLQMt36naATkL7IwDVhvI5mDCgWStLehUJKcFqdXUW+16zlVlhma4SVZoM34sis3RJs X29A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GJN8S8B1; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t4si7642423pgb.97.2019.01.16.14.52.18; Wed, 16 Jan 2019 14:52:33 -0800 (PST) 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=@kernel.org header.s=default header.b=GJN8S8B1; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2394124AbfAPPi0 (ORCPT + 99 others); Wed, 16 Jan 2019 10:38:26 -0500 Received: from mail.kernel.org ([198.145.29.99]:47840 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387906AbfAPPi0 (ORCPT ); Wed, 16 Jan 2019 10:38:26 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0F65220675; Wed, 16 Jan 2019 15:38:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1547653105; bh=EUKcnzzT2mgLCAbwSxtZtVeonQm0pveYdCHMEse5Bz8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GJN8S8B1AMwT80G3hMEbc570qZOq97ILi4G7ATDJ+vwcGTDnqeprySvu6YVjvUBeO rTJfQcyn7a0Wwg6RKggAZ5wGKKqAagdGxX/rp4gvDIyoS1+v8dEYIC0Eo4+txZJyPK /zbWV54EE5220QJB+0vr2fULFHpgPzWrlNAptprg= Date: Wed, 16 Jan 2019 16:38:23 +0100 From: Greg Kroah-Hartman To: Thomas Gleixner Cc: LKML , Kuninori Morimoto , Simon Horman , Yoshinori Sato , Rich Felker , Andrew Morton , Kate Stewart , Jonathan Corbet Subject: Re: [patch 2/2] scripts/spdxcheck.py: Handle special quotation mark comments Message-ID: <20190116153823.GB871@kroah.com> References: <20190116102651.489113812@linutronix.de> <20190116104127.698565432@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190116104127.698565432@linutronix.de> User-Agent: Mutt/1.11.2 (2019-01-07) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Cc: Kuninori Morimoto > Cc: Simon Horman > Cc: Yoshinori Sato > Cc: Rich Felker > Cc: Andrew Morton > Cc: Kate Stewart > Cc: Greg Kroah-Hartman > Cc: Jonathan Corbet > --- > 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