[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190131095625.261755-1-pihsun@chromium.org>
Date: Thu, 31 Jan 2019 17:56:25 +0800
From: Pi-Hsun Shih <pihsun@...omium.org>
To: unlisted-recipients:; (no To-header on input)
Cc: Pi-Hsun Shih <pihsun@...omium.org>,
Andy Whitcroft <apw@...onical.com>,
Joe Perches <joe@...ches.com>,
linux-kernel@...r.kernel.org (open list)
Subject: [PATCH] checkpatch: Properly detect /* */ style SPDX header.
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 <pihsun@...omium.org>
---
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
Powered by blists - more mailing lists