* [PATCH 06/20] powercap: remove MODULE_LICENSE in non-modules
2023-02-28 13:01 [PATCH 00/20] MODULE_LICENSE removals, fifth tranche Nick Alcock
@ 2023-02-28 13:02 ` Nick Alcock
2023-02-28 20:33 ` Rafael J. Wysocki
2023-02-28 13:02 ` [PATCH 07/20] power: supply: " Nick Alcock
` (3 subsequent siblings)
4 siblings, 1 reply; 8+ messages in thread
From: Nick Alcock @ 2023-02-28 13:02 UTC (permalink / raw)
To: mcgrof
Cc: linux-modules, linux-kernel, Hitomi Hasegawa, Rafael J. Wysocki,
linux-pm
Since commit 8b41fc4454e ("kbuild: create modules.builtin without
Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations
are used to identify modules. As a consequence, uses of the macro
in non-modules will cause modprobe to misidentify their containing
object file as a module when it is not (false positives), and modprobe
might succeed rather than failing with a suitable error message.
So remove it in the files in this commit, none of which can be built as
modules.
Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Suggested-by: Luis Chamberlain <mcgrof@kernel.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: linux-modules@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: linux-pm@vger.kernel.org
---
drivers/powercap/powercap_sys.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/powercap/powercap_sys.c b/drivers/powercap/powercap_sys.c
index 1f968353d4799..df806a788a02d 100644
--- a/drivers/powercap/powercap_sys.c
+++ b/drivers/powercap/powercap_sys.c
@@ -675,4 +675,3 @@ fs_initcall(powercap_init);
MODULE_DESCRIPTION("PowerCap sysfs Driver");
MODULE_AUTHOR("Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>");
-MODULE_LICENSE("GPL v2");
--
2.39.1.268.g9de2f9a303
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH 06/20] powercap: remove MODULE_LICENSE in non-modules
2023-02-28 13:02 ` [PATCH 06/20] powercap: remove MODULE_LICENSE in non-modules Nick Alcock
@ 2023-02-28 20:33 ` Rafael J. Wysocki
0 siblings, 0 replies; 8+ messages in thread
From: Rafael J. Wysocki @ 2023-02-28 20:33 UTC (permalink / raw)
To: Nick Alcock
Cc: mcgrof, linux-modules, linux-kernel, Hitomi Hasegawa,
Rafael J. Wysocki, linux-pm
On Tue, Feb 28, 2023 at 2:03 PM Nick Alcock <nick.alcock@oracle.com> wrote:
>
> Since commit 8b41fc4454e ("kbuild: create modules.builtin without
> Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations
> are used to identify modules. As a consequence, uses of the macro
> in non-modules will cause modprobe to misidentify their containing
> object file as a module when it is not (false positives), and modprobe
> might succeed rather than failing with a suitable error message.
>
> So remove it in the files in this commit, none of which can be built as
> modules.
>
> Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
> Suggested-by: Luis Chamberlain <mcgrof@kernel.org>
> Cc: Luis Chamberlain <mcgrof@kernel.org>
> Cc: linux-modules@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Cc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> Cc: linux-pm@vger.kernel.org
> ---
> drivers/powercap/powercap_sys.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/powercap/powercap_sys.c b/drivers/powercap/powercap_sys.c
> index 1f968353d4799..df806a788a02d 100644
> --- a/drivers/powercap/powercap_sys.c
> +++ b/drivers/powercap/powercap_sys.c
> @@ -675,4 +675,3 @@ fs_initcall(powercap_init);
>
> MODULE_DESCRIPTION("PowerCap sysfs Driver");
> MODULE_AUTHOR("Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>");
> -MODULE_LICENSE("GPL v2");
> --
Applied as 6.3-rc material, thanks!
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 07/20] power: supply: remove MODULE_LICENSE in non-modules
2023-02-28 13:01 [PATCH 00/20] MODULE_LICENSE removals, fifth tranche Nick Alcock
2023-02-28 13:02 ` [PATCH 06/20] powercap: remove MODULE_LICENSE in non-modules Nick Alcock
@ 2023-02-28 13:02 ` Nick Alcock
2023-02-28 13:02 ` [PATCH 19/20] power: reset: " Nick Alcock
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Nick Alcock @ 2023-02-28 13:02 UTC (permalink / raw)
To: mcgrof
Cc: linux-modules, linux-kernel, Hitomi Hasegawa, Sebastian Reichel,
linux-pm
Since commit 8b41fc4454e ("kbuild: create modules.builtin without
Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations
are used to identify modules. As a consequence, uses of the macro
in non-modules will cause modprobe to misidentify their containing
object file as a module when it is not (false positives), and modprobe
might succeed rather than failing with a suitable error message.
So remove it in the files in this commit, none of which can be built as
modules.
Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Suggested-by: Luis Chamberlain <mcgrof@kernel.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: linux-modules@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
Cc: Sebastian Reichel <sre@kernel.org>
Cc: linux-pm@vger.kernel.org
---
drivers/power/supply/power_supply_core.c | 1 -
drivers/power/supply/wm97xx_battery.c | 1 -
2 files changed, 2 deletions(-)
diff --git a/drivers/power/supply/power_supply_core.c b/drivers/power/supply/power_supply_core.c
index 7c790c41e2fe3..411fb8b8945a7 100644
--- a/drivers/power/supply/power_supply_core.c
+++ b/drivers/power/supply/power_supply_core.c
@@ -1578,4 +1578,3 @@ MODULE_DESCRIPTION("Universal power supply monitor class");
MODULE_AUTHOR("Ian Molton <spyro@f2s.com>, "
"Szabolcs Gyurko, "
"Anton Vorontsov <cbou@mail.ru>");
-MODULE_LICENSE("GPL");
diff --git a/drivers/power/supply/wm97xx_battery.c b/drivers/power/supply/wm97xx_battery.c
index a0e1eaa25d93e..f4b190adb3359 100644
--- a/drivers/power/supply/wm97xx_battery.c
+++ b/drivers/power/supply/wm97xx_battery.c
@@ -271,6 +271,5 @@ static struct platform_driver wm97xx_bat_driver = {
module_platform_driver(wm97xx_bat_driver);
-MODULE_LICENSE("GPL");
MODULE_AUTHOR("Marek Vasut <marek.vasut@gmail.com>");
MODULE_DESCRIPTION("WM97xx battery driver");
--
2.39.1.268.g9de2f9a303
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 19/20] power: reset: remove MODULE_LICENSE in non-modules
2023-02-28 13:01 [PATCH 00/20] MODULE_LICENSE removals, fifth tranche Nick Alcock
2023-02-28 13:02 ` [PATCH 06/20] powercap: remove MODULE_LICENSE in non-modules Nick Alcock
2023-02-28 13:02 ` [PATCH 07/20] power: supply: " Nick Alcock
@ 2023-02-28 13:02 ` Nick Alcock
2023-02-28 13:47 ` [PATCH 00/20] MODULE_LICENSE removals, fifth tranche Geert Uytterhoeven
2023-03-09 16:14 ` Greg KH
4 siblings, 0 replies; 8+ messages in thread
From: Nick Alcock @ 2023-02-28 13:02 UTC (permalink / raw)
To: mcgrof
Cc: linux-modules, linux-kernel, Hitomi Hasegawa, Sebastian Reichel,
linux-pm
Since commit 8b41fc4454e ("kbuild: create modules.builtin without
Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations
are used to identify modules. As a consequence, uses of the macro
in non-modules will cause modprobe to misidentify their containing
object file as a module when it is not (false positives), and modprobe
might succeed rather than failing with a suitable error message.
So remove it in the files in this commit, none of which can be built as
modules.
Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Suggested-by: Luis Chamberlain <mcgrof@kernel.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: linux-modules@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
Cc: Sebastian Reichel <sre@kernel.org>
Cc: linux-pm@vger.kernel.org
---
drivers/power/reset/as3722-poweroff.c | 1 -
drivers/power/reset/gpio-poweroff.c | 1 -
drivers/power/reset/gpio-restart.c | 1 -
drivers/power/reset/ltc2952-poweroff.c | 1 -
drivers/power/reset/regulator-poweroff.c | 1 -
drivers/power/reset/restart-poweroff.c | 1 -
drivers/power/reset/tps65086-restart.c | 1 -
7 files changed, 7 deletions(-)
diff --git a/drivers/power/reset/as3722-poweroff.c b/drivers/power/reset/as3722-poweroff.c
index 661e1c67f82ee..80edff1a556f8 100644
--- a/drivers/power/reset/as3722-poweroff.c
+++ b/drivers/power/reset/as3722-poweroff.c
@@ -84,4 +84,3 @@ module_platform_driver(as3722_poweroff_driver);
MODULE_DESCRIPTION("Power off driver for ams AS3722 PMIC Device");
MODULE_ALIAS("platform:as3722-power-off");
MODULE_AUTHOR("Laxman Dewangan <ldewangan@nvidia.com>");
-MODULE_LICENSE("GPL v2");
diff --git a/drivers/power/reset/gpio-poweroff.c b/drivers/power/reset/gpio-poweroff.c
index 1c5af2fef1423..84b3c3528afa1 100644
--- a/drivers/power/reset/gpio-poweroff.c
+++ b/drivers/power/reset/gpio-poweroff.c
@@ -105,5 +105,4 @@ module_platform_driver(gpio_poweroff_driver);
MODULE_AUTHOR("Jamie Lentin <jm@lentin.co.uk>");
MODULE_DESCRIPTION("GPIO poweroff driver");
-MODULE_LICENSE("GPL v2");
MODULE_ALIAS("platform:poweroff-gpio");
diff --git a/drivers/power/reset/gpio-restart.c b/drivers/power/reset/gpio-restart.c
index 5466eeea261cd..35d981d5e6c8f 100644
--- a/drivers/power/reset/gpio-restart.c
+++ b/drivers/power/reset/gpio-restart.c
@@ -139,4 +139,3 @@ module_platform_driver(gpio_restart_driver);
MODULE_AUTHOR("David Riley <davidriley@chromium.org>");
MODULE_DESCRIPTION("GPIO restart driver");
-MODULE_LICENSE("GPL");
diff --git a/drivers/power/reset/ltc2952-poweroff.c b/drivers/power/reset/ltc2952-poweroff.c
index 65d9528cc9899..eea05921a054b 100644
--- a/drivers/power/reset/ltc2952-poweroff.c
+++ b/drivers/power/reset/ltc2952-poweroff.c
@@ -317,4 +317,3 @@ module_platform_driver(ltc2952_poweroff_driver);
MODULE_AUTHOR("René Moll <rene.moll@xsens.com>");
MODULE_DESCRIPTION("LTC PowerPath power-off driver");
-MODULE_LICENSE("GPL v2");
diff --git a/drivers/power/reset/regulator-poweroff.c b/drivers/power/reset/regulator-poweroff.c
index 20701203935f0..7f87fbb8b051e 100644
--- a/drivers/power/reset/regulator-poweroff.c
+++ b/drivers/power/reset/regulator-poweroff.c
@@ -79,5 +79,4 @@ module_platform_driver(regulator_poweroff_driver);
MODULE_AUTHOR("Michael Klein <michael@fossekall.de>");
MODULE_DESCRIPTION("Regulator poweroff driver");
-MODULE_LICENSE("GPL v2");
MODULE_ALIAS("platform:poweroff-regulator");
diff --git a/drivers/power/reset/restart-poweroff.c b/drivers/power/reset/restart-poweroff.c
index 04d4228119b2c..28f1822db1626 100644
--- a/drivers/power/reset/restart-poweroff.c
+++ b/drivers/power/reset/restart-poweroff.c
@@ -59,5 +59,4 @@ module_platform_driver(restart_poweroff_driver);
MODULE_AUTHOR("Andrew Lunn <andrew@lunn.ch");
MODULE_DESCRIPTION("restart poweroff driver");
-MODULE_LICENSE("GPL v2");
MODULE_ALIAS("platform:poweroff-restart");
diff --git a/drivers/power/reset/tps65086-restart.c b/drivers/power/reset/tps65086-restart.c
index 78b89f745a3de..5ec819eac7da4 100644
--- a/drivers/power/reset/tps65086-restart.c
+++ b/drivers/power/reset/tps65086-restart.c
@@ -95,4 +95,3 @@ module_platform_driver(tps65086_restart_driver);
MODULE_AUTHOR("Emil Renner Berthing <kernel@esmil.dk>");
MODULE_DESCRIPTION("TPS65086 restart driver");
-MODULE_LICENSE("GPL v2");
--
2.39.1.268.g9de2f9a303
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH 00/20] MODULE_LICENSE removals, fifth tranche
2023-02-28 13:01 [PATCH 00/20] MODULE_LICENSE removals, fifth tranche Nick Alcock
` (2 preceding siblings ...)
2023-02-28 13:02 ` [PATCH 19/20] power: reset: " Nick Alcock
@ 2023-02-28 13:47 ` Geert Uytterhoeven
2023-03-20 11:06 ` Nick Alcock
2023-03-09 16:14 ` Greg KH
4 siblings, 1 reply; 8+ messages in thread
From: Geert Uytterhoeven @ 2023-02-28 13:47 UTC (permalink / raw)
To: Nick Alcock
Cc: mcgrof, linux-clk, linux-gpio, linux-kernel, linux-modules,
linux-perf-users, linux-pm, linux-remoteproc, linux-renesas-soc,
linux-riscv, linux-serial, linux-tegra, linux-trace-devel,
linux-trace-kernel
Hi Nick,
On Tue, Feb 28, 2023 at 2:05 PM Nick Alcock <nick.alcock@oracle.com> wrote:
> This series, based on current modules-next, is part of a treewide cleanup
> suggested by Luis Chamberlain, to remove the LICENSE_MODULE usage from
> files/objects that are not tristate. Due to recent changes to kbuild, these
> uses are now problematic. See the commit logs for more details.
Does this mean you expect us to queue them for v6.3?
Thanks!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH 00/20] MODULE_LICENSE removals, fifth tranche
2023-02-28 13:47 ` [PATCH 00/20] MODULE_LICENSE removals, fifth tranche Geert Uytterhoeven
@ 2023-03-20 11:06 ` Nick Alcock
0 siblings, 0 replies; 8+ messages in thread
From: Nick Alcock @ 2023-03-20 11:06 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Nick Alcock, mcgrof, linux-clk, linux-gpio, linux-kernel,
linux-modules, linux-perf-users, linux-pm, linux-remoteproc,
linux-renesas-soc, linux-riscv, linux-serial, linux-tegra,
linux-trace-devel, linux-trace-kernel
On 28 Feb 2023, Geert Uytterhoeven outgrape:
> On Tue, Feb 28, 2023 at 2:05 PM Nick Alcock <nick.alcock@oracle.com> wrote:
>> This series, based on current modules-next, is part of a treewide cleanup
>> suggested by Luis Chamberlain, to remove the LICENSE_MODULE usage from
>> files/objects that are not tristate. Due to recent changes to kbuild, these
>> uses are now problematic. See the commit logs for more details.
>
> Does this mean you expect us to queue them for v6.3?
> Thanks!
I believe Luis is planning to pull them in around -rc3, hence my
freshening the series up now, getting everyone's tags in, etc.
--
NULL && (void)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 00/20] MODULE_LICENSE removals, fifth tranche
2023-02-28 13:01 [PATCH 00/20] MODULE_LICENSE removals, fifth tranche Nick Alcock
` (3 preceding siblings ...)
2023-02-28 13:47 ` [PATCH 00/20] MODULE_LICENSE removals, fifth tranche Geert Uytterhoeven
@ 2023-03-09 16:14 ` Greg KH
4 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2023-03-09 16:14 UTC (permalink / raw)
To: Nick Alcock
Cc: mcgrof, linux-clk, linux-gpio, linux-kernel, linux-modules,
linux-perf-users, linux-pm, linux-remoteproc, linux-renesas-soc,
linux-riscv, linux-serial, linux-tegra, linux-trace-devel,
linux-trace-kernel
On Tue, Feb 28, 2023 at 01:01:55PM +0000, Nick Alcock wrote:
> This series, based on current modules-next, is part of a treewide cleanup
> suggested by Luis Chamberlain, to remove the LICENSE_MODULE usage from
> files/objects that are not tristate. Due to recent changes to kbuild, these
> uses are now problematic. See the commit logs for more details.
Why isn't kbuild fixed instead? These files can have MODULE_AUTHOR()
and other macros when built into the kernel, what is so special about
MODULE_LICENSE() that prevents this from working properly?
There should not be a need to remove these markings in my opinion, why
treat one MODULE_* macro more special than others?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 8+ messages in thread