check Makefile and Kconfigs for SPDX tag
Subsystems (16)
cover check Makefile and Kconfigs for SPDX tag
From: Tom Rix <[email protected]>
A followup to
https://lore.kernel.org/linux-fpga/[email protected]/
So I do not repeat this problem, add a SPDX checker for Makefiles and Kconfigs to checkpatch.
Then treewide fix the malformed Makefiles and Kconfigs. Those missing tags are numerous.Kconfig has 46Makefile has 141
Run checkpatch generally over the dirs with Makefile or Kconfig problems to check nothing broke in checkpatch. Fix the few problems turned up
Tom Rix (7):
checkpatch: check Makefiles and Kconfigs for SPDX tag
mei: hdcp: SPDX tag should be the first line drivers/soc/litex: fix spelling of SPDX tag
MIPS: Loongson64: fix spelling of SPDX tag iio/scmi: fix spelling of SPDX tag
mt76: add a space between comment char and SPDX tag
mt76: use SPDX header file comment style
arch/mips/boot/dts/loongson/Makefile | 2 +- drivers/iio/common/scmi_sensors/Makefile | 2 +- drivers/misc/mei/hdcp/Kconfig | 1 - drivers/net/wireless/mediatek/mt76/mt7615/Makefile | 2 +- drivers/net/wireless/mediatek/mt76/mt7615/sdio.h | 2 +- drivers/net/wireless/mediatek/mt76/mt7915/Makefile | 2 +- drivers/net/wireless/mediatek/mt76/mt7915/testmode.h | 2 +- drivers/net/wireless/mediatek/mt76/mt7921/Makefile | 2 +- drivers/soc/litex/Kconfig | 2 +- drivers/soc/litex/Makefile | 2 +- scripts/checkpatch.pl | 2 +- 11 files changed, 10 insertions(+), 11 deletions(-)
Signature · 1 line
2.26.3
PATCH 1/7 checkpatch: check Makefiles and Kconfigs for SPDX tag
From: Tom Rix <[email protected]>
Both Makefiles and Kconfigs should carry an SPDX tag. Something like
# SPDX-License-Identifier: GPL-2.0-only
Add a matcher to existing check
--- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/checkpatch.pl +1 -1
@@ -3572,7 +3572,7 @@ sub process { $comment = '/*'; } elsif ($realfile =~ /\.(c|dts|dtsi)$/) { $comment = '//'; - } elsif (($checklicenseline == 2) || $realfile =~ /\.(sh|pl|py|awk|tc|yaml)$/) { + } elsif (($checklicenseline == 2) || $realfile =~ /\.(sh|pl|py|awk|tc|yaml)$|Kconfig|Makefile/) { $comment = '#'; } elsif ($realfile =~ /\.rst$/) { $comment = '..';
Signature · 1 line
2.26.3
Joe Perches
maintainerRe: [PATCH 1/7] checkpatch: check Makefiles and Kconfigs for SPDX tag
Quoted 9 lines · On Thu, 2021-06-10 at 14:44 -0700, [email protected] wrote:
From: Tom Rix <[email protected]>
Both Makefiles and Kconfigs should carry an SPDX tag. Something like
# SPDX-License-Identifier: GPL-2.0-onlyAdd a matcher to existing check
Signed-off-by Tom Rix <[email protected]>
Seems fine, thanks.
There's a Makefile with two tags that could be updated too.
--- drivers/staging/media/atomisp/Makefile | 1 - 1 file changed, 1 deletion(-)
drivers/staging/media/atomisp/Makefile +0 -1
@@ -11,7 +11,6 @@ DEFINES += -DDEBUG atomisp = $(srctree)/drivers/staging/media/atomisp/ -# SPDX-License-Identifier: GPL-2.0 atomisp-objs += \ pci/atomisp_acc.o \ pci/atomisp_cmd.o \
PATCH 2/7 mei: hdcp: SPDX tag should be the first line
In reply to [email protected]From: Tom Rix <[email protected]>
checkpatch looks for the tag on the first line.
So delete empty first line
--- drivers/misc/mei/hdcp/Kconfig | 1 - 1 file changed, 1 deletion(-)
drivers/misc/mei/hdcp/Kconfig +0 -1
@@ -1,4 +1,3 @@ - # SPDX-License-Identifier: GPL-2.0 # Copyright (c) 2019, Intel Corporation. All rights reserved. #
Signature · 1 line
2.26.3
RE: [PATCH 2/7] mei: hdcp: SPDX tag should be the first line
Quoted 7 lines
From: Tom Rix <[email protected]>
checkpatch looks for the tag on the first line.
So delete empty first lineSigned-off-by Tom Rix <[email protected]>
Quoted 15 lines
--- drivers/misc/mei/hdcp/Kconfig | 1 - 1 file changed, 1 deletion(-)drivers/misc/mei/hdcp/Kconfig +0
-2@@ -1,4 +1,3 @@ - # SPDX-License-Identifier: GPL-2.0 # Copyright (c) 2019, Intel Corporation. All rights reserved. # --2.26.3
PATCH 3/7 drivers/soc/litex: fix spelling of SPDX tag
In reply to [email protected]From: Tom Rix <[email protected]>
checkpatch looks for SPDX-License-Identifier.
So change the '_' to '-'
--- drivers/soc/litex/Kconfig | 2 +- drivers/soc/litex/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/soc/litex/Kconfig +1 -1
@@ -1,4 +1,4 @@ -# SPDX-License_Identifier: GPL-2.0 +# SPDX-License-Identifier: GPL-2.0 menu "Enable LiteX SoC Builder specific drivers"
drivers/soc/litex/Makefile +1 -1
@@ -1,3 +1,3 @@ -# SPDX-License_Identifier: GPL-2.0 +# SPDX-License-Identifier: GPL-2.0 obj-$(CONFIG_LITEX_SOC_CONTROLLER) += litex_soc_ctrl.o
Signature · 1 line
2.26.3
Re: [PATCH 3/7] drivers/soc/litex: fix spelling of SPDX tag
Quoted 6 lines · On Thu, Jun 10, 2021 at 02:44:34PM -0700, [email protected] wrote:
From: Tom Rix <[email protected]>
checkpatch looks for SPDX-License-Identifier.
So change the '_' to '-'Signed-off-by Tom Rix <[email protected]>
Quoted 27 lines
--- drivers/soc/litex/Kconfig | 2 +- drivers/soc/litex/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)drivers/soc/litex/Kconfig +1
-1@@ -1,4 +1,4 @@ -# SPDX-License_Identifier: GPL-2.0 +# SPDX-License-Identifier: GPL-2.0 menu "Enable LiteX SoC Builder specific drivers"drivers/soc/litex/Makefile +1
-1@@ -1,3 +1,3 @@ -# SPDX-License_Identifier: GPL-2.0 +# SPDX-License-Identifier: GPL-2.0 obj-$(CONFIG_LITEX_SOC_CONTROLLER) += litex_soc_ctrl.oSignature · 1 line
2.26.3
PATCH 4/7 MIPS: Loongson64: fix spelling of SPDX tag
In reply to [email protected]From: Tom Rix <[email protected]>
checkpatch looks for SPDX-License-Identifier.
So change the '_' to '-'
--- arch/mips/boot/dts/loongson/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/boot/dts/loongson/Makefile +1 -1
@@ -1,4 +1,4 @@ -# SPDX_License_Identifier: GPL_2.0 +# SPDX-License-Identifier: GPL-2.0 dtb-$(CONFIG_MACH_LOONGSON64) += loongson64_2core_2k1000.dtb dtb-$(CONFIG_MACH_LOONGSON64) += loongson64c_4core_ls7a.dtb dtb-$(CONFIG_MACH_LOONGSON64) += loongson64c_4core_rs780e.dtb
Signature · 1 line
2.26.3
Re: [PATCH 4/7] MIPS: Loongson64: fix spelling of SPDX tag
Quoted 9 lines · On Thu, Jun 10, 2021 at 02:44:35PM -0700, [email protected] wrote:
From: Tom Rix <[email protected]>
checkpatch looks for SPDX-License-Identifier.
So change the '_' to '-'Signed-off-by Tom Rix <[email protected]>--- arch/mips/boot/dts/loongson/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
applied to mips-next.
Thomas.
Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]
PATCH 5/7 iio/scmi: fix spelling of SPDX tag
In reply to [email protected]From: Tom Rix <[email protected]>
checkpatch looks for SPDX-License-Identifier.
Remove the extra spaces.
--- drivers/iio/common/scmi_sensors/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/common/scmi_sensors/Makefile +1 -1
@@ -1,4 +1,4 @@ -# SPDX - License - Identifier : GPL - 2.0 - only +# SPDX-License-Identifier: GPL-2.0-only # # Makefile for the IIO over SCMI #
Signature · 1 line
2.26.3
Jonathan Cameron
maintainerRe: [PATCH 5/7] iio/scmi: fix spelling of SPDX tag
Quoted 6 lines · On Thu, 10 Jun 2021 14:44:36 -0700 [email protected] wrote:
From: Tom Rix <[email protected]>
checkpatch looks for SPDX-License-Identifier.
Remove the extra spaces.Signed-off-by Tom Rix <[email protected]>
Applied this one to the togreg branch of iio.git (initially pushed out as testing to let 0-day have first poke at it). Thanks,
Jonathan
Quoted 14 lines
--- drivers/iio/common/scmi_sensors/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/iio/common/scmi_sensors/Makefile +1
-1@@ -1,4 +1,4 @@ -# SPDX - License - Identifier : GPL - 2.0 - only +# SPDX-License-Identifier: GPL-2.0-only # # Makefile for the IIO over SCMI #
PATCH 6/7 mt76: add a space between comment char and SPDX tag
In reply to [email protected]From: Tom Rix <[email protected]>
checkpatch expects a space between '#' and 'SPDX...' Add a space.
--- drivers/net/wireless/mediatek/mt76/mt7615/Makefile | 2 +- drivers/net/wireless/mediatek/mt76/mt7915/Makefile | 2 +- drivers/net/wireless/mediatek/mt76/mt7921/Makefile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7615/Makefile +1 -1
@@ -1,4 +1,4 @@ -#SPDX-License-Identifier: ISC +# SPDX-License-Identifier: ISC obj-$(CONFIG_MT7615_COMMON) += mt7615-common.o obj-$(CONFIG_MT7615E) += mt7615e.o
drivers/net/wireless/mediatek/mt76/mt7915/Makefile +1 -1
@@ -1,4 +1,4 @@ -#SPDX-License-Identifier: ISC +# SPDX-License-Identifier: ISC obj-$(CONFIG_MT7915E) += mt7915e.o
drivers/net/wireless/mediatek/mt76/mt7921/Makefile +1 -1
@@ -1,4 +1,4 @@ -#SPDX-License-Identifier: ISC +# SPDX-License-Identifier: ISC obj-$(CONFIG_MT7921E) += mt7921e.o
Signature · 1 line
2.26.3
PATCH 7/7 mt76: use SPDX header file comment style
In reply to [email protected]From: Tom Rix <[email protected]>
header files should use '/* SPDX ... */
Change from c file comment syle to header style
--- drivers/net/wireless/mediatek/mt76/mt7615/sdio.h | 2 +- drivers/net/wireless/mediatek/mt76/mt7915/testmode.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7615/sdio.h +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: ISC +/* SPDX-License-Identifier: ISC */ /* Copyright (C) 2020 MediaTek Inc. * * Author: Sean Wang <[email protected]>
drivers/net/wireless/mediatek/mt76/mt7915/testmode.h +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: ISC +/* SPDX-License-Identifier: ISC */ /* Copyright (C) 2020 MediaTek Inc. */ #ifndef __MT7915_TESTMODE_H
Signature · 1 line
2.26.3