From: Pi-Hsun Shih <pihsun@chromium.org>
To: unlisted-recipients:; (no To-header on input)
Cc: Pi-Hsun Shih <pihsun@chromium.org>,
Andy Whitcroft <apw@canonical.com>, Joe Perches <joe@perches.com>,
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH] checkpatch: Properly detect /* */ style SPDX header.
Date: Thu, 31 Jan 2019 17:56:25 +0800 [thread overview]
Message-ID: <20190131095625.261755-1-pihsun@chromium.org> (raw)
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@chromium.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
next reply other threads:[~2019-01-31 9:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-31 9:56 Pi-Hsun Shih [this message]
2019-01-31 16:54 ` [PATCH] checkpatch: Properly detect /* */ style SPDX header Joe Perches
2019-02-12 8:47 ` Pi-Hsun Shih
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=20190131095625.261755-1-pihsun@chromium.org \
--to=pihsun@chromium.org \
--cc=apw@canonical.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).