Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1455859imu; Wed, 16 Jan 2019 20:25:23 -0800 (PST) X-Google-Smtp-Source: ALg8bN5coBd9WHsR/TkJwzN8xmKkcxzSBjxspXBrY8YdKAy2lOO2B1ghVnBaOLjQ//6SW7uXI/2p X-Received: by 2002:a17:902:b40d:: with SMTP id x13mr13574625plr.237.1547699123609; Wed, 16 Jan 2019 20:25:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547699123; cv=none; d=google.com; s=arc-20160816; b=Zn3mC5hMgpGkhEGsV8m0mCG0wvxg4Ta0agTWDxL8pZtS6iLaBCU3jI8VR/E6z9AB6h Kg0NIJFQAsvKQAf8sm9Dm0OpUT2APGkJDDNHZ69Rqp/erQ0HTu7nro+BRpP0Fa64VJMe 4IKKwzEC2D6FuIueQa9H0PmHmsbJAiLFdHDttWUdRwOs1db04K3vm2pqvWZtqaGwx7tQ 6Q/mvwa6cAdJACmXdnfdSxkiIkY3vVqcT0f7UrOpnJMuxtk7gOc/2qJxDEV57DBfcgb3 Xbg9vtD9fJ+AlmKBWC1ELsSSXuoS3nJp6dvU0PBY7/a0wpcA35jcr5QVLuAU1Z3Ol0Qo 8AWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:subject:cc:to :from:date:user-agent:message-id; bh=2dGFcUqCcqbuKq3TlZpWy/x8vKNZ9noZxtGkLYgPvjs=; b=wqNW//jR2OjN51mNVXZ6RgnByptEgOBMqTc+KS0JPbzksZhZFENf4jqE0qGwCy49At N6xse7PI3BOknlsveldPGDpXfLyL0ZB3ppvLB5C1I0uQWb5PgVdwp9RKXqgmuNBianlo wm7kyfnVVZ/twQkAIvASNAavLxt4MZs0VxF4l9EnNhH3kxEfEJU1nhd5xhfs+j6JBmc6 CzpIYIIZ7AwOjoHwagQMzgtm5U2ev5bvLbkYZczmnm3BZX27HTff07AXTC6Ogc7jZc6R YkBGMitW9YWnaaz/3TFQ0QU7+eZ3kAbyVyDpdYwEkmCN0JhVfrJqmEJkwT8YKgaK8ga1 S3gA== ARC-Authentication-Results: i=1; mx.google.com; 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 e66si572396plb.107.2019.01.16.20.25.05; Wed, 16 Jan 2019 20:25:23 -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; 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 S2392149AbfAPKna (ORCPT + 99 others); Wed, 16 Jan 2019 05:43:30 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:44641 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392138AbfAPKn3 (ORCPT ); Wed, 16 Jan 2019 05:43:29 -0500 Received: from localhost ([127.0.0.1] helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtp (Exim 4.80) (envelope-from ) id 1gjifO-0005H2-Np; Wed, 16 Jan 2019 11:43:26 +0100 Message-Id: <20190116104127.698565432@linutronix.de> User-Agent: quilt/0.65 Date: Wed, 16 Jan 2019 11:26:53 +0100 From: Thomas Gleixner To: LKML Cc: Kuninori Morimoto , Simon Horman , Yoshinori Sato , Rich Felker , Andrew Morton , Kate Stewart , Greg Kroah-Hartman , Jonathan Corbet Subject: [patch 2/2] scripts/spdxcheck.py: Handle special quotation mark comments References: <20190116102651.489113812@linutronix.de> MIME-Version: 1.0 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 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 #