* [PATCH] checkpatch: Properly detect /* */ style SPDX header.
@ 2019-01-31 9:56 Pi-Hsun Shih
2019-01-31 16:54 ` Joe Perches
0 siblings, 1 reply; 3+ messages in thread
From: Pi-Hsun Shih @ 2019-01-31 9:56 UTC (permalink / raw)
Cc: Pi-Hsun Shih, Andy Whitcroft, Joe Perches, open list
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] checkpatch: Properly detect /* */ style SPDX header.
2019-01-31 9:56 [PATCH] checkpatch: Properly detect /* */ style SPDX header Pi-Hsun Shih
@ 2019-01-31 16:54 ` Joe Perches
2019-02-12 8:47 ` Pi-Hsun Shih
0 siblings, 1 reply; 3+ messages in thread
From: Joe Perches @ 2019-01-31 16:54 UTC (permalink / raw)
To: Pi-Hsun Shih; +Cc: Andy Whitcroft, open list
On Thu, 2019-01-31 at 17:56 +0800, Pi-Hsun Shih wrote:
> 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.
Thanks but I submitted a different patch:
https://lore.kernel.org/lkml/8b02899853247a2c67669561761f354dd3bd110e.camel@perches.com/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] checkpatch: Properly detect /* */ style SPDX header.
2019-01-31 16:54 ` Joe Perches
@ 2019-02-12 8:47 ` Pi-Hsun Shih
0 siblings, 0 replies; 3+ messages in thread
From: Pi-Hsun Shih @ 2019-02-12 8:47 UTC (permalink / raw)
To: Joe Perches; +Cc: Andy Whitcroft, open list
On Fri, Feb 1, 2019 at 12:54 AM Joe Perches <joe@perches.com> wrote:
>
> On Thu, 2019-01-31 at 17:56 +0800, Pi-Hsun Shih wrote:
> > 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.
>
> Thanks but I submitted a different patch:
>
> https://lore.kernel.org/lkml/8b02899853247a2c67669561761f354dd3bd110e.camel@perches.com/
>
I tried your patch, but when running checkpatch.pl on
https://patchwork.kernel.org/patch/10790203/, I still get:
WARNING: 'SPDX-License-Identifier: GPL-2.0 */' is not supported in LICENSES/...
#75: FILE: drivers/remoteproc/mtk_common.h:1:
+/* SPDX-License-Identifier: GPL-2.0 */
Feels that these two patches fix different issues.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-02-12 8:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-31 9:56 [PATCH] checkpatch: Properly detect /* */ style SPDX header Pi-Hsun Shih
2019-01-31 16:54 ` Joe Perches
2019-02-12 8:47 ` Pi-Hsun Shih
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).