Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6927831imu; Thu, 31 Jan 2019 01:58:21 -0800 (PST) X-Google-Smtp-Source: ALg8bN7DT58GOldTvbycOvY87bzRy9XAJLUC0baCrld9NOuyKsNeVgcnZulTDNNZoSrVm8LUkhBG X-Received: by 2002:a63:fa06:: with SMTP id y6mr30971327pgh.177.1548928701476; Thu, 31 Jan 2019 01:58:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548928701; cv=none; d=google.com; s=arc-20160816; b=DvcRisLlbfmpWMYTXhEejRfJ+7VX3TZP7EzVtATrwrG7xRgbqE+R9A9wCjc86HcPcB ANS+oe2Vhcw4W954Nv9XrUAhrjDsRMQfkHAB/mSUYmcJZSYDES+j+isdewIFOAuVixmV 7RSipF6hky0+fq4/IMUOaMTTSYXtYCK+ZFZTm8Av4OJbME2MCQXJvQAOchW/lU1zWXlS +31rt3/nB4D7Z1hi3TqexSWUQeKvNScwwaQwj40xAa0AkBLxT5zl+ZEHf44Wj/IY3fLp C/AptAQfR1nrdR4t+uxNAWWZT1+QCjYGAkU7xF6l7PyG4M9UB3CIcZAnDYR3T/TZYJsK b3dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from:dkim-signature; bh=D9rgrmz7zvCwt6KzmO/XCtKc4dtNzesbjo8qK3Pc4oU=; b=A2Kb7V/KWIvBJCkc528eyZFNYS4VunAIPQCHX9s0qNrCIzWH8RtwWlz4AQ19FQPf0s lQaEDwNQ/wI4iix7v5k44m+KO0mwx8A15vcBLsIhrnlOUiPubm7b3nTLX9PTI53RzqFQ u3dIPwEOPupDbQgla6T8ukWsel44cLAILFZEP5oKKF0kyd+fWB2OL9+H3rLk8A4X8CBm j+zF3Cwbt9eNQKJnJdzHNj1KF0AgALeHa++NdoqZkh0AxRcWh+FvalFQ82NAAeRgy8kP PJikPNE4Betj9E1iFINUPYSVzFQwP3RE9nwrCNpTX+Njp837+fuNSCy/BNlSRflkuxFZ iXSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@chromium.org header.s=google header.b=HywkS7Rp; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g3si3690364pgi.443.2019.01.31.01.58.05; Thu, 31 Jan 2019 01:58:21 -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=fail header.i=@chromium.org header.s=google header.b=HywkS7Rp; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731768AbfAaJ4m (ORCPT + 99 others); Thu, 31 Jan 2019 04:56:42 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:43514 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726316AbfAaJ4m (ORCPT ); Thu, 31 Jan 2019 04:56:42 -0500 Received: by mail-pg1-f194.google.com with SMTP id v28so1133626pgk.10 for ; Thu, 31 Jan 2019 01:56:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=D9rgrmz7zvCwt6KzmO/XCtKc4dtNzesbjo8qK3Pc4oU=; b=HywkS7RpVzFiHpIKcNgYNBWLwlIbnjtPfx4OKoEFZNHUwGjTs1e1OdbpPU+3rMHnRF RGadcU8LKbx40fEagSPh3evM7FSQqOm075vYkKfrhrhFtOyloODLh2tWM1CszuG06nKY Trnj/oFTzyEdRyJQRzIKF7dvHyL7BSgCt2DDc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=D9rgrmz7zvCwt6KzmO/XCtKc4dtNzesbjo8qK3Pc4oU=; b=HCtPisknqR3NZfOHaYQSuPIU1dYy3PSnQ3wEMe5HVO9qjKUb5Ge5t/EnWVuFlqzqrT zh5/WchBhKMi0+m89DiedaUNaiMH74kxhEH3pJcehgZQhwpItGA6GFpxrUeAt6cPXZrr 4qK1fTOUh99Sw/dK/v8BqdeVwNUZBwHQ2+hWgJLGm4gwPz6TwjhrT0nGejBKvsgVa+Q5 hw81RoidKiyXrmTz5bfux7eOvBInpwJHsaz70m8Ov2WEUWZp4HinGg9nOFAkxScm9MEu EMMSc79fZhsC76XdcrqWAfrbO4xrIyPT7S0Ky8jc9S4ysAAEU5km8OU+xMIlk+G24PbE 6JcQ== X-Gm-Message-State: AJcUukcCElXJiH5BYxz/OsEm31mM/IYAYoqgc03+0GPzAcQwjdAODiA1 jl8ayDtoywARvYxHsOemvWn8jg8mt9o= X-Received: by 2002:a63:4c4e:: with SMTP id m14mr31227476pgl.173.1548928601491; Thu, 31 Jan 2019 01:56:41 -0800 (PST) Received: from pihsun-z840.tpe.corp.google.com ([2401:fa00:1:10:7889:7a43:f899:134c]) by smtp.googlemail.com with ESMTPSA id e123sm5128879pgc.58.2019.01.31.01.56.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 Jan 2019 01:56:40 -0800 (PST) From: Pi-Hsun Shih Cc: Pi-Hsun Shih , Andy Whitcroft , Joe Perches , linux-kernel@vger.kernel.org (open list) Subject: [PATCH] checkpatch: Properly detect /* */ style SPDX header. Date: Thu, 31 Jan 2019 17:56:25 +0800 Message-Id: <20190131095625.261755-1-pihsun@chromium.org> X-Mailer: git-send-email 2.20.1.611.gfbb209baf1-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently for a header line "/* SPDX-License-Identifier: GPL-2.0 */", only the part starting from "SPDX-" is passed to spdxcheck.py, and cause false warning. Fix this by passing the whole line to spdxcheck.py instead. Fixes: 3b6e8ac9e740 ("checkpatch: validate SPDX license with spdxcheck.py") Signed-off-by: Pi-Hsun Shih --- scripts/checkpatch.pl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index cfe0396c98459a..8a7cca4e2efb00 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3044,10 +3044,9 @@ sub process { WARN("SPDX_LICENSE_TAG", "Missing or malformed SPDX-License-Identifier tag in line $checklicenseline\n" . $herecurr); } elsif ($rawline =~ /(SPDX-License-Identifier: .*)/) { - my $spdx_license = $1; - if (!is_SPDX_License_valid($spdx_license)) { + if (!is_SPDX_License_valid($rawline)) { WARN("SPDX_LICENSE_TAG", - "'$spdx_license' is not supported in LICENSES/...\n" . $herecurr); + "'$rawline' is not supported in LICENSES/...\n" . $herecurr); } } } -- 2.20.1.611.gfbb209baf1-goog