* [PATCH 0/8] drivers/pinctrl: remove truly orphaned module code @ 2016-02-29 20:48 Paul Gortmaker 2016-02-29 20:48 ` [PATCH 1/8] drivers/pinctrl: sunxi/pinctrl-sunxi.c does not need module.h Paul Gortmaker ` (7 more replies) 0 siblings, 8 replies; 25+ messages in thread From: Paul Gortmaker @ 2016-02-29 20:48 UTC (permalink / raw) To: linux-kernel Cc: Paul Gortmaker, Antoine Tenart, Beniamino Galvani, Boris Brezillon, Carlo Caione, Chen-Yu Tsai, Geert Uytterhoeven, Hans de Goede, Hongzhou Yang, Laurent Pinchart, Linus Walleij, Masahiro Yamada, Matthias Brugger, Maxime Coquelin, Maxime Ripard, Patrice Chotard, Thomas Abraham, Tomasz Figa, Vishnu Patekar, linux-arm-kernel This series of commits is a part of a larger project to ensure people don't reference modular support functions in non-modular code. Overall there was roughly 5k lines of dead code in the kernel due to this. So far we've fixed several areas, like tty, x86, net, ... and we continue to work on other areas. There are several reasons to not use module support for code that can never be built as a module, but the big ones are: (1) it is easy to accidentally write unused module_exit and remove code (2) it can be misleading when reading the source, thinking it can be modular when the Makefile and/or Kconfig prohibit it (3) it requires the include of the module.h header file which in turn includes nearly everything else, thus adding to CPP overhead. (4) it gets copied/replicated into other code and spreads like weeds. This group represents roughly 1/2 of the pinctrl commits I've got under testing locally. The commonality within this group is that there should be zero runtime changes with this series, because none of the drivers here deployed a ".remove" field which in turn would cause me to add the ".suppress_bind_attrs = true," to the driver struct. Similarly there is no change in the initcall ordering either. So hopefully with that in mind it eases review. I'm happy to have this go in via the maintainer's tree and reduce the (large) number of patches I'm carrying locally. --- Cc: Antoine Tenart <antoine.tenart@free-electrons.com> Cc: Beniamino Galvani <b.galvani@gmail.com> Cc: Boris Brezillon <boris.brezillon@free-electrons.com> Cc: Carlo Caione <carlo@endlessm.com> Cc: Chen-Yu Tsai <wens@csie.org> Cc: Geert Uytterhoeven <geert+renesas@glider.be> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Hongzhou Yang <hongzhou.yang@mediatek.com> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Matthias Brugger <matthias.bgg@gmail.com> Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com> Cc: Maxime Ripard <maxime.ripard@free-electrons.com> Cc: Patrice Chotard <patrice.chotard@st.com> Cc: Thomas Abraham <thomas.ab@samsung.com> Cc: Tomasz Figa <tomasz.figa@gmail.com> Cc: Vishnu Patekar <vishnupatekar0510@gmail.com> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-gpio@vger.kernel.org Cc: linux-mediatek@lists.infradead.org Cc: linux-renesas-soc@vger.kernel.org Cc: linux-samsung-soc@vger.kernel.org Paul Gortmaker (8): drivers/pinctrl: sunxi/pinctrl-sunxi.c does not need module.h drivers/pinctrl: make mediatek/pinctrl-mt6397 driver explicitly non-modular drivers/pinctrl: make meson/pinctrl-meson.c explicitly non-modular drivers/pinctrl: make sh-pfc/core.c explicitly non-modular drivers/pinctrl: make stm32/pinctrl-stm32f429.c explicitly non-modular drivers/pinctrl: make sunxi/pinctrl-sun[4-9]* explicitly non-modular drivers/pinctrl: make sunxi/pinctrl-sun9i-a80-r.c explicitly non-modular drivers/pinctrl: clean up samsung modular vs. non-modular distinctions drivers/pinctrl/mediatek/pinctrl-mt6397.c | 10 ++-------- drivers/pinctrl/meson/pinctrl-meson.c | 8 +------- drivers/pinctrl/samsung/pinctrl-exynos.c | 1 - drivers/pinctrl/samsung/pinctrl-exynos5440.c | 15 +++------------ drivers/pinctrl/samsung/pinctrl-s3c24xx.c | 2 +- drivers/pinctrl/samsung/pinctrl-s3c64xx.c | 2 +- drivers/pinctrl/samsung/pinctrl-samsung.c | 12 +----------- drivers/pinctrl/sh-pfc/core.c | 18 ++++-------------- drivers/pinctrl/stm32/pinctrl-stm32f429.c | 9 +-------- drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c | 9 ++------- drivers/pinctrl/sunxi/pinctrl-sun5i-a10s.c | 9 ++------- drivers/pinctrl/sunxi/pinctrl-sun5i-a13.c | 9 ++------- drivers/pinctrl/sunxi/pinctrl-sun6i-a31-r.c | 10 ++-------- drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c | 9 ++------- drivers/pinctrl/sunxi/pinctrl-sun6i-a31s.c | 9 ++------- drivers/pinctrl/sunxi/pinctrl-sun7i-a20.c | 9 ++------- drivers/pinctrl/sunxi/pinctrl-sun8i-a23-r.c | 11 ++--------- drivers/pinctrl/sunxi/pinctrl-sun8i-a23.c | 10 ++-------- drivers/pinctrl/sunxi/pinctrl-sun8i-a33.c | 9 ++------- drivers/pinctrl/sunxi/pinctrl-sun9i-a80-r.c | 9 ++------- drivers/pinctrl/sunxi/pinctrl-sun9i-a80.c | 9 ++------- drivers/pinctrl/sunxi/pinctrl-sunxi.c | 2 +- 22 files changed, 39 insertions(+), 152 deletions(-) -- 2.6.1 ^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH 1/8] drivers/pinctrl: sunxi/pinctrl-sunxi.c does not need module.h 2016-02-29 20:48 [PATCH 0/8] drivers/pinctrl: remove truly orphaned module code Paul Gortmaker @ 2016-02-29 20:48 ` Paul Gortmaker 2016-03-01 7:13 ` Maxime Ripard 2016-03-09 2:59 ` Linus Walleij [not found] ` <1456778924-20730-1-git-send-email-paul.gortmaker-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org> ` (6 subsequent siblings) 7 siblings, 2 replies; 25+ messages in thread From: Paul Gortmaker @ 2016-02-29 20:48 UTC (permalink / raw) To: linux-kernel Cc: Paul Gortmaker, Linus Walleij, Maxime Ripard, linux-gpio, linux-arm-kernel This file is not modular, nor is it using modular functions. The only thing close is the global THIS_MODULE which comes from export.h so lets replace it appropriately and cut back on the amount of header stuff we draw in by several thousand lines. Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Maxime Ripard <maxime.ripard@free-electrons.com> Cc: linux-gpio@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> --- drivers/pinctrl/sunxi/pinctrl-sunxi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/sunxi/pinctrl-sunxi.c b/drivers/pinctrl/sunxi/pinctrl-sunxi.c index 45135500c8d5..12a1dfabb1af 100644 --- a/drivers/pinctrl/sunxi/pinctrl-sunxi.c +++ b/drivers/pinctrl/sunxi/pinctrl-sunxi.c @@ -15,7 +15,7 @@ #include <linux/gpio/driver.h> #include <linux/irqdomain.h> #include <linux/irqchip/chained_irq.h> -#include <linux/module.h> +#include <linux/export.h> #include <linux/of.h> #include <linux/of_address.h> #include <linux/of_device.h> -- 2.6.1 ^ permalink raw reply related [flat|nested] 25+ messages in thread
* Re: [PATCH 1/8] drivers/pinctrl: sunxi/pinctrl-sunxi.c does not need module.h 2016-02-29 20:48 ` [PATCH 1/8] drivers/pinctrl: sunxi/pinctrl-sunxi.c does not need module.h Paul Gortmaker @ 2016-03-01 7:13 ` Maxime Ripard 2016-03-09 2:59 ` Linus Walleij 1 sibling, 0 replies; 25+ messages in thread From: Maxime Ripard @ 2016-03-01 7:13 UTC (permalink / raw) To: Paul Gortmaker; +Cc: linux-kernel, Linus Walleij, linux-gpio, linux-arm-kernel [-- Attachment #1: Type: text/plain, Size: 769 bytes --] On Mon, Feb 29, 2016 at 03:48:37PM -0500, Paul Gortmaker wrote: > This file is not modular, nor is it using modular functions. The > only thing close is the global THIS_MODULE which comes from export.h > so lets replace it appropriately and cut back on the amount of > header stuff we draw in by several thousand lines. > > Cc: Linus Walleij <linus.walleij@linaro.org> > Cc: Maxime Ripard <maxime.ripard@free-electrons.com> > Cc: linux-gpio@vger.kernel.org > Cc: linux-arm-kernel@lists.infradead.org > Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Thanks, Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 1/8] drivers/pinctrl: sunxi/pinctrl-sunxi.c does not need module.h 2016-02-29 20:48 ` [PATCH 1/8] drivers/pinctrl: sunxi/pinctrl-sunxi.c does not need module.h Paul Gortmaker 2016-03-01 7:13 ` Maxime Ripard @ 2016-03-09 2:59 ` Linus Walleij 1 sibling, 0 replies; 25+ messages in thread From: Linus Walleij @ 2016-03-09 2:59 UTC (permalink / raw) To: Paul Gortmaker Cc: linux-kernel@vger.kernel.org, Maxime Ripard, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org On Tue, Mar 1, 2016 at 3:48 AM, Paul Gortmaker <paul.gortmaker@windriver.com> wrote: > This file is not modular, nor is it using modular functions. The > only thing close is the global THIS_MODULE which comes from export.h > so lets replace it appropriately and cut back on the amount of > header stuff we draw in by several thousand lines. > > Cc: Linus Walleij <linus.walleij@linaro.org> > Cc: Maxime Ripard <maxime.ripard@free-electrons.com> > Cc: linux-gpio@vger.kernel.org > Cc: linux-arm-kernel@lists.infradead.org > Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Patch applied with Maxime's ACK. Yours, Linus Walleij ^ permalink raw reply [flat|nested] 25+ messages in thread
[parent not found: <1456778924-20730-1-git-send-email-paul.gortmaker-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>]
* [PATCH 2/8] drivers/pinctrl: make mediatek/pinctrl-mt6397 driver explicitly non-modular [not found] ` <1456778924-20730-1-git-send-email-paul.gortmaker-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org> @ 2016-02-29 20:48 ` Paul Gortmaker [not found] ` <1456778924-20730-3-git-send-email-paul.gortmaker-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org> 2016-03-09 3:01 ` Linus Walleij 0 siblings, 2 replies; 25+ messages in thread From: Paul Gortmaker @ 2016-02-29 20:48 UTC (permalink / raw) To: linux-kernel-u79uwXL29TY76Z2rM5mHXA Cc: linux-gpio-u79uwXL29TY76Z2rM5mHXA, Hongzhou Yang, Linus Walleij, Paul Gortmaker, linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Matthias Brugger The Kconfig for this driver is currently: config PINCTRL_MT6397 bool "Mediatek MT6397 pin control" if COMPILE_TEST && !MFD_MT6397 ...meaning that it is currently not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. Since module_init translates to device_initcall in the non-modular case, the init ordering remains unchanged with this commit. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. Cc: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> Cc: Matthias Brugger <matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Cc: Hongzhou Yang <hongzhou.yang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org> Cc: linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org Signed-off-by: Paul Gortmaker <paul.gortmaker-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org> --- drivers/pinctrl/mediatek/pinctrl-mt6397.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/pinctrl/mediatek/pinctrl-mt6397.c b/drivers/pinctrl/mediatek/pinctrl-mt6397.c index f9751ae28e32..6eccb85c02cd 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mt6397.c +++ b/drivers/pinctrl/mediatek/pinctrl-mt6397.c @@ -12,7 +12,7 @@ * GNU General Public License for more details. */ -#include <linux/module.h> +#include <linux/init.h> #include <linux/platform_device.h> #include <linux/of.h> #include <linux/of_device.h> @@ -55,7 +55,6 @@ static const struct of_device_id mt6397_pctrl_match[] = { { .compatible = "mediatek,mt6397-pinctrl", }, { } }; -MODULE_DEVICE_TABLE(of, mt6397_pctrl_match); static struct platform_driver mtk_pinctrl_driver = { .probe = mt6397_pinctrl_probe, @@ -69,9 +68,4 @@ static int __init mtk_pinctrl_init(void) { return platform_driver_register(&mtk_pinctrl_driver); } - -module_init(mtk_pinctrl_init); - -MODULE_LICENSE("GPL v2"); -MODULE_DESCRIPTION("MediaTek MT6397 Pinctrl Driver"); -MODULE_AUTHOR("Hongzhou Yang <hongzhou.yang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>"); +device_initcall(mtk_pinctrl_init); -- 2.6.1 ^ permalink raw reply related [flat|nested] 25+ messages in thread
[parent not found: <1456778924-20730-3-git-send-email-paul.gortmaker-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>]
* Re: [PATCH 2/8] drivers/pinctrl: make mediatek/pinctrl-mt6397 driver explicitly non-modular [not found] ` <1456778924-20730-3-git-send-email-paul.gortmaker-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org> @ 2016-03-01 20:02 ` Hongzhou Yang 0 siblings, 0 replies; 25+ messages in thread From: Hongzhou Yang @ 2016-03-01 20:02 UTC (permalink / raw) To: Paul Gortmaker Cc: biao.huang-NuS5LvNUpcJWk0Htik3J/w, Linus Walleij, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-gpio-u79uwXL29TY76Z2rM5mHXA, linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Matthias Brugger, yingjoe.chen-NuS5LvNUpcJWk0Htik3J/w, eddie.huang-NuS5LvNUpcJWk0Htik3J/w On Mon, 2016-02-29 at 15:48 -0500, Paul Gortmaker wrote: > The Kconfig for this driver is currently: > > config PINCTRL_MT6397 > bool "Mediatek MT6397 pin control" if COMPILE_TEST && !MFD_MT6397 > > ...meaning that it is currently not being built as a module by anyone. > Lets remove the modular code that is essentially orphaned, so that > when reading the driver there is no doubt it is builtin-only. > > Since module_init translates to device_initcall in the non-modular > case, the init ordering remains unchanged with this commit. > > We also delete the MODULE_LICENSE tag etc. since all that information > is already contained at the top of the file in the comments. > > Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. > > Cc: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> > Cc: Matthias Brugger <matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > Cc: Hongzhou Yang <hongzhou.yang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org> > Cc: linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > Cc: linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org > Signed-off-by: Paul Gortmaker <paul.gortmaker-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org> > --- > drivers/pinctrl/mediatek/pinctrl-mt6397.c | 10 ++-------- > 1 file changed, 2 insertions(+), 8 deletions(-) > > diff --git a/drivers/pinctrl/mediatek/pinctrl-mt6397.c b/drivers/pinctrl/mediatek/pinctrl-mt6397.c > index f9751ae28e32..6eccb85c02cd 100644 > --- a/drivers/pinctrl/mediatek/pinctrl-mt6397.c > +++ b/drivers/pinctrl/mediatek/pinctrl-mt6397.c > @@ -12,7 +12,7 @@ > * GNU General Public License for more details. > */ > > -#include <linux/module.h> > +#include <linux/init.h> > #include <linux/platform_device.h> > #include <linux/of.h> > #include <linux/of_device.h> > @@ -55,7 +55,6 @@ static const struct of_device_id mt6397_pctrl_match[] = { > { .compatible = "mediatek,mt6397-pinctrl", }, > { } > }; > -MODULE_DEVICE_TABLE(of, mt6397_pctrl_match); > > static struct platform_driver mtk_pinctrl_driver = { > .probe = mt6397_pinctrl_probe, > @@ -69,9 +68,4 @@ static int __init mtk_pinctrl_init(void) > { > return platform_driver_register(&mtk_pinctrl_driver); > } > - > -module_init(mtk_pinctrl_init); > - > -MODULE_LICENSE("GPL v2"); > -MODULE_DESCRIPTION("MediaTek MT6397 Pinctrl Driver"); > -MODULE_AUTHOR("Hongzhou Yang <hongzhou.yang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>"); > +device_initcall(mtk_pinctrl_init); Acked-by: Hongzhou Yang <hongzhou.yang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org> Thanks, Hongzhou ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 2/8] drivers/pinctrl: make mediatek/pinctrl-mt6397 driver explicitly non-modular 2016-02-29 20:48 ` [PATCH 2/8] drivers/pinctrl: make mediatek/pinctrl-mt6397 driver explicitly non-modular Paul Gortmaker [not found] ` <1456778924-20730-3-git-send-email-paul.gortmaker-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org> @ 2016-03-09 3:01 ` Linus Walleij 1 sibling, 0 replies; 25+ messages in thread From: Linus Walleij @ 2016-03-09 3:01 UTC (permalink / raw) To: Paul Gortmaker Cc: linux-kernel@vger.kernel.org, Matthias Brugger, Hongzhou Yang, linux-gpio@vger.kernel.org, moderated list:ARM/Mediatek SoC support On Tue, Mar 1, 2016 at 3:48 AM, Paul Gortmaker <paul.gortmaker@windriver.com> wrote: > The Kconfig for this driver is currently: > > config PINCTRL_MT6397 > bool "Mediatek MT6397 pin control" if COMPILE_TEST && !MFD_MT6397 > > ...meaning that it is currently not being built as a module by anyone. > Lets remove the modular code that is essentially orphaned, so that > when reading the driver there is no doubt it is builtin-only. > > Since module_init translates to device_initcall in the non-modular > case, the init ordering remains unchanged with this commit. > > We also delete the MODULE_LICENSE tag etc. since all that information > is already contained at the top of the file in the comments. > > Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. > > Cc: Linus Walleij <linus.walleij@linaro.org> > Cc: Matthias Brugger <matthias.bgg@gmail.com> > Cc: Hongzhou Yang <hongzhou.yang@mediatek.com> > Cc: linux-gpio@vger.kernel.org > Cc: linux-mediatek@lists.infradead.org > Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Patch applied with Honzhou's ACK. Yours, Linus Walleij ^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH 3/8] drivers/pinctrl: make meson/pinctrl-meson.c explicitly non-modular 2016-02-29 20:48 [PATCH 0/8] drivers/pinctrl: remove truly orphaned module code Paul Gortmaker 2016-02-29 20:48 ` [PATCH 1/8] drivers/pinctrl: sunxi/pinctrl-sunxi.c does not need module.h Paul Gortmaker [not found] ` <1456778924-20730-1-git-send-email-paul.gortmaker-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org> @ 2016-02-29 20:48 ` Paul Gortmaker 2016-03-09 3:04 ` Linus Walleij 2016-02-29 20:48 ` [PATCH 4/8] drivers/pinctrl: make sh-pfc/core.c " Paul Gortmaker ` (4 subsequent siblings) 7 siblings, 1 reply; 25+ messages in thread From: Paul Gortmaker @ 2016-02-29 20:48 UTC (permalink / raw) To: linux-kernel Cc: Paul Gortmaker, Linus Walleij, Beniamino Galvani, Carlo Caione, Masahiro Yamada, Antoine Tenart, linux-gpio The Kconfig currently controlling compilation of this code is: drivers/pinctrl/Kconfig:config PINCTRL_MESON drivers/pinctrl/Kconfig: bool ...meaning that it currently is not being built as a module by anyone. Lets remove the couple traces of modularity so that when reading the driver there is no doubt it is builtin-only. Since module_platform_driver() uses the same init level priority as builtin_platform_driver() the init ordering remains unchanged with this commit. We don't replace module.h with init.h since the file already has that. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Beniamino Galvani <b.galvani@gmail.com> Cc: Carlo Caione <carlo@endlessm.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Antoine Tenart <antoine.tenart@free-electrons.com> Cc: linux-gpio@vger.kernel.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> --- drivers/pinctrl/meson/pinctrl-meson.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/pinctrl/meson/pinctrl-meson.c b/drivers/pinctrl/meson/pinctrl-meson.c index 50cab27c64d4..3dd1a446f6f4 100644 --- a/drivers/pinctrl/meson/pinctrl-meson.c +++ b/drivers/pinctrl/meson/pinctrl-meson.c @@ -49,7 +49,6 @@ #include <linux/gpio.h> #include <linux/init.h> #include <linux/io.h> -#include <linux/module.h> #include <linux/of.h> #include <linux/of_address.h> #include <linux/pinctrl/pinconf-generic.h> @@ -546,7 +545,6 @@ static const struct of_device_id meson_pinctrl_dt_match[] = { }, { }, }; -MODULE_DEVICE_TABLE(of, meson_pinctrl_dt_match); static int meson_gpiolib_register(struct meson_pinctrl *pc) { @@ -754,8 +752,4 @@ static struct platform_driver meson_pinctrl_driver = { .of_match_table = meson_pinctrl_dt_match, }, }; -module_platform_driver(meson_pinctrl_driver); - -MODULE_AUTHOR("Beniamino Galvani <b.galvani@gmail.com>"); -MODULE_DESCRIPTION("Amlogic Meson pinctrl driver"); -MODULE_LICENSE("GPL v2"); +builtin_platform_driver(meson_pinctrl_driver); -- 2.6.1 ^ permalink raw reply related [flat|nested] 25+ messages in thread
* Re: [PATCH 3/8] drivers/pinctrl: make meson/pinctrl-meson.c explicitly non-modular 2016-02-29 20:48 ` [PATCH 3/8] drivers/pinctrl: make meson/pinctrl-meson.c " Paul Gortmaker @ 2016-03-09 3:04 ` Linus Walleij 0 siblings, 0 replies; 25+ messages in thread From: Linus Walleij @ 2016-03-09 3:04 UTC (permalink / raw) To: Paul Gortmaker Cc: linux-kernel@vger.kernel.org, Beniamino Galvani, Carlo Caione, Masahiro Yamada, Antoine Tenart, linux-gpio@vger.kernel.org On Tue, Mar 1, 2016 at 3:48 AM, Paul Gortmaker <paul.gortmaker@windriver.com> wrote: > The Kconfig currently controlling compilation of this code is: > > drivers/pinctrl/Kconfig:config PINCTRL_MESON > drivers/pinctrl/Kconfig: bool > > ...meaning that it currently is not being built as a module by anyone. > > Lets remove the couple traces of modularity so that when reading the > driver there is no doubt it is builtin-only. > > Since module_platform_driver() uses the same init level priority as > builtin_platform_driver() the init ordering remains unchanged with > this commit. > > We don't replace module.h with init.h since the file already has that. > > Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. > > We also delete the MODULE_LICENSE tag etc. since all that information > is already contained at the top of the file in the comments. > > Cc: Linus Walleij <linus.walleij@linaro.org> > Cc: Beniamino Galvani <b.galvani@gmail.com> > Cc: Carlo Caione <carlo@endlessm.com> > Cc: Masahiro Yamada <yamada.masahiro@socionext.com> > Cc: Antoine Tenart <antoine.tenart@free-electrons.com> > Cc: linux-gpio@vger.kernel.org > Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Patch applied. Yours, Linus Walleij ^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH 4/8] drivers/pinctrl: make sh-pfc/core.c explicitly non-modular 2016-02-29 20:48 [PATCH 0/8] drivers/pinctrl: remove truly orphaned module code Paul Gortmaker ` (2 preceding siblings ...) 2016-02-29 20:48 ` [PATCH 3/8] drivers/pinctrl: make meson/pinctrl-meson.c " Paul Gortmaker @ 2016-02-29 20:48 ` Paul Gortmaker 2016-02-29 22:00 ` Laurent Pinchart ` (2 more replies) 2016-02-29 20:48 ` [PATCH 5/8] drivers/pinctrl: make stm32/pinctrl-stm32f429.c " Paul Gortmaker ` (3 subsequent siblings) 7 siblings, 3 replies; 25+ messages in thread From: Paul Gortmaker @ 2016-02-29 20:48 UTC (permalink / raw) To: linux-kernel Cc: Paul Gortmaker, Laurent Pinchart, Geert Uytterhoeven, Linus Walleij, linux-renesas-soc, linux-gpio The Kconfig / Makefile currently controlling compilation of this code is: drivers/pinctrl/sh-pfc/Makefile:obj-$(CONFIG_PINCTRL_SH_PFC) += sh-pfc.o drivers/pinctrl/sh-pfc/Makefile:sh-pfc-objs = core.o pinctrl.o drivers/pinctrl/sh-pfc/Kconfig:config PINCTRL_SH_PFC drivers/pinctrl/sh-pfc/Kconfig: def_bool y ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. Since module_init already wasn't being used in this code, the init ordering remains unchanged with this commit. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information was (or is now) contained at the top of the file in the comments. Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Geert Uytterhoeven <geert+renesas@glider.be> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: linux-renesas-soc@vger.kernel.org Cc: linux-gpio@vger.kernel.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> --- drivers/pinctrl/sh-pfc/core.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/drivers/pinctrl/sh-pfc/core.c b/drivers/pinctrl/sh-pfc/core.c index 181ea98a63b7..3f3f904e458b 100644 --- a/drivers/pinctrl/sh-pfc/core.c +++ b/drivers/pinctrl/sh-pfc/core.c @@ -1,5 +1,7 @@ /* - * SuperH Pin Function Controller support. + * Pin Control and GPIO driver for SuperH Pin Function Controller. + * + * Authors: Magnus Damm, Paul Mundt, Laurent Pinchart * * Copyright (C) 2008 Magnus Damm * Copyright (C) 2009 - 2012 Paul Mundt @@ -17,7 +19,7 @@ #include <linux/io.h> #include <linux/ioport.h> #include <linux/kernel.h> -#include <linux/module.h> +#include <linux/init.h> #include <linux/of.h> #include <linux/of_device.h> #include <linux/pinctrl/machine.h> @@ -503,7 +505,6 @@ static const struct of_device_id sh_pfc_of_table[] = { #endif { }, }; -MODULE_DEVICE_TABLE(of, sh_pfc_of_table); #endif static int sh_pfc_probe(struct platform_device *pdev) @@ -632,7 +633,6 @@ static const struct platform_device_id sh_pfc_id_table[] = { { "sh-pfc", 0 }, { }, }; -MODULE_DEVICE_TABLE(platform, sh_pfc_id_table); static struct platform_driver sh_pfc_driver = { .probe = sh_pfc_probe, @@ -649,13 +649,3 @@ static int __init sh_pfc_init(void) return platform_driver_register(&sh_pfc_driver); } postcore_initcall(sh_pfc_init); - -static void __exit sh_pfc_exit(void) -{ - platform_driver_unregister(&sh_pfc_driver); -} -module_exit(sh_pfc_exit); - -MODULE_AUTHOR("Magnus Damm, Paul Mundt, Laurent Pinchart"); -MODULE_DESCRIPTION("Pin Control and GPIO driver for SuperH pin function controller"); -MODULE_LICENSE("GPL v2"); -- 2.6.1 ^ permalink raw reply related [flat|nested] 25+ messages in thread
* Re: [PATCH 4/8] drivers/pinctrl: make sh-pfc/core.c explicitly non-modular 2016-02-29 20:48 ` [PATCH 4/8] drivers/pinctrl: make sh-pfc/core.c " Paul Gortmaker @ 2016-02-29 22:00 ` Laurent Pinchart 2016-03-02 11:05 ` Geert Uytterhoeven 2016-03-09 3:24 ` Linus Walleij 2 siblings, 0 replies; 25+ messages in thread From: Laurent Pinchart @ 2016-02-29 22:00 UTC (permalink / raw) To: Paul Gortmaker Cc: linux-kernel, Geert Uytterhoeven, Linus Walleij, linux-renesas-soc, linux-gpio Hi Paul, Thank you for the patch. On Monday 29 February 2016 15:48:40 Paul Gortmaker wrote: > The Kconfig / Makefile currently controlling compilation of this code is: > > drivers/pinctrl/sh-pfc/Makefile:obj-$(CONFIG_PINCTRL_SH_PFC) += sh-pfc.o > drivers/pinctrl/sh-pfc/Makefile:sh-pfc-objs = core.o > pinctrl.o > > drivers/pinctrl/sh-pfc/Kconfig:config PINCTRL_SH_PFC > drivers/pinctrl/sh-pfc/Kconfig: def_bool y > > ...meaning that it currently is not being built as a module by anyone. > > Lets remove the modular code that is essentially orphaned, so that > when reading the driver there is no doubt it is builtin-only. > > Since module_init already wasn't being used in this code, the init > ordering remains unchanged with this commit. > > Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. > > We also delete the MODULE_LICENSE tag etc. since all that information > was (or is now) contained at the top of the file in the comments. > > Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > Cc: Geert Uytterhoeven <geert+renesas@glider.be> > Cc: Linus Walleij <linus.walleij@linaro.org> > Cc: linux-renesas-soc@vger.kernel.org > Cc: linux-gpio@vger.kernel.org > Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > drivers/pinctrl/sh-pfc/core.c | 18 ++++-------------- > 1 file changed, 4 insertions(+), 14 deletions(-) > > diff --git a/drivers/pinctrl/sh-pfc/core.c b/drivers/pinctrl/sh-pfc/core.c > index 181ea98a63b7..3f3f904e458b 100644 > --- a/drivers/pinctrl/sh-pfc/core.c > +++ b/drivers/pinctrl/sh-pfc/core.c > @@ -1,5 +1,7 @@ > /* > - * SuperH Pin Function Controller support. > + * Pin Control and GPIO driver for SuperH Pin Function Controller. > + * > + * Authors: Magnus Damm, Paul Mundt, Laurent Pinchart > * > * Copyright (C) 2008 Magnus Damm > * Copyright (C) 2009 - 2012 Paul Mundt > @@ -17,7 +19,7 @@ > #include <linux/io.h> > #include <linux/ioport.h> > #include <linux/kernel.h> > -#include <linux/module.h> > +#include <linux/init.h> > #include <linux/of.h> > #include <linux/of_device.h> > #include <linux/pinctrl/machine.h> > @@ -503,7 +505,6 @@ static const struct of_device_id sh_pfc_of_table[] = { > #endif > { }, > }; > -MODULE_DEVICE_TABLE(of, sh_pfc_of_table); > #endif > > static int sh_pfc_probe(struct platform_device *pdev) > @@ -632,7 +633,6 @@ static const struct platform_device_id sh_pfc_id_table[] > = { { "sh-pfc", 0 }, > { }, > }; > -MODULE_DEVICE_TABLE(platform, sh_pfc_id_table); > > static struct platform_driver sh_pfc_driver = { > .probe = sh_pfc_probe, > @@ -649,13 +649,3 @@ static int __init sh_pfc_init(void) > return platform_driver_register(&sh_pfc_driver); > } > postcore_initcall(sh_pfc_init); > - > -static void __exit sh_pfc_exit(void) > -{ > - platform_driver_unregister(&sh_pfc_driver); > -} > -module_exit(sh_pfc_exit); > - > -MODULE_AUTHOR("Magnus Damm, Paul Mundt, Laurent Pinchart"); > -MODULE_DESCRIPTION("Pin Control and GPIO driver for SuperH pin function > controller"); -MODULE_LICENSE("GPL v2"); -- Regards, Laurent Pinchart ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 4/8] drivers/pinctrl: make sh-pfc/core.c explicitly non-modular 2016-02-29 20:48 ` [PATCH 4/8] drivers/pinctrl: make sh-pfc/core.c " Paul Gortmaker 2016-02-29 22:00 ` Laurent Pinchart @ 2016-03-02 11:05 ` Geert Uytterhoeven 2016-03-09 3:24 ` Linus Walleij 2 siblings, 0 replies; 25+ messages in thread From: Geert Uytterhoeven @ 2016-03-02 11:05 UTC (permalink / raw) To: Paul Gortmaker, Linus Walleij Cc: linux-kernel@vger.kernel.org, Laurent Pinchart, Geert Uytterhoeven, linux-renesas-soc, linux-gpio@vger.kernel.org On Mon, Feb 29, 2016 at 9:48 PM, Paul Gortmaker <paul.gortmaker@windriver.com> wrote: > The Kconfig / Makefile currently controlling compilation of this code is: > > drivers/pinctrl/sh-pfc/Makefile:obj-$(CONFIG_PINCTRL_SH_PFC) += sh-pfc.o > drivers/pinctrl/sh-pfc/Makefile:sh-pfc-objs = core.o pinctrl.o > > drivers/pinctrl/sh-pfc/Kconfig:config PINCTRL_SH_PFC > drivers/pinctrl/sh-pfc/Kconfig: def_bool y > > ...meaning that it currently is not being built as a module by anyone. > > Lets remove the modular code that is essentially orphaned, so that > when reading the driver there is no doubt it is builtin-only. > > Since module_init already wasn't being used in this code, the init > ordering remains unchanged with this commit. > > Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. > > We also delete the MODULE_LICENSE tag etc. since all that information > was (or is now) contained at the top of the file in the comments. > > Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > Cc: Geert Uytterhoeven <geert+renesas@glider.be> > Cc: Linus Walleij <linus.walleij@linaro.org> > Cc: linux-renesas-soc@vger.kernel.org > Cc: linux-gpio@vger.kernel.org > Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Linus: Feel free to take this with the other patches from the series. Or do you prefer I queue it up in sh-pfc-for-v4.7? 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] 25+ messages in thread
* Re: [PATCH 4/8] drivers/pinctrl: make sh-pfc/core.c explicitly non-modular 2016-02-29 20:48 ` [PATCH 4/8] drivers/pinctrl: make sh-pfc/core.c " Paul Gortmaker 2016-02-29 22:00 ` Laurent Pinchart 2016-03-02 11:05 ` Geert Uytterhoeven @ 2016-03-09 3:24 ` Linus Walleij 2 siblings, 0 replies; 25+ messages in thread From: Linus Walleij @ 2016-03-09 3:24 UTC (permalink / raw) To: Paul Gortmaker Cc: linux-kernel@vger.kernel.org, Laurent Pinchart, Geert Uytterhoeven, linux-renesas-soc, linux-gpio@vger.kernel.org On Tue, Mar 1, 2016 at 3:48 AM, Paul Gortmaker <paul.gortmaker@windriver.com> wrote: > The Kconfig / Makefile currently controlling compilation of this code is: > > drivers/pinctrl/sh-pfc/Makefile:obj-$(CONFIG_PINCTRL_SH_PFC) += sh-pfc.o > drivers/pinctrl/sh-pfc/Makefile:sh-pfc-objs = core.o pinctrl.o > > drivers/pinctrl/sh-pfc/Kconfig:config PINCTRL_SH_PFC > drivers/pinctrl/sh-pfc/Kconfig: def_bool y > > ...meaning that it currently is not being built as a module by anyone. > > Lets remove the modular code that is essentially orphaned, so that > when reading the driver there is no doubt it is builtin-only. > > Since module_init already wasn't being used in this code, the init > ordering remains unchanged with this commit. > > Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. > > We also delete the MODULE_LICENSE tag etc. since all that information > was (or is now) contained at the top of the file in the comments. > > Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > Cc: Geert Uytterhoeven <geert+renesas@glider.be> > Cc: Linus Walleij <linus.walleij@linaro.org> > Cc: linux-renesas-soc@vger.kernel.org > Cc: linux-gpio@vger.kernel.org > Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Patch applied with Laurent's and Geert's ACKs. Yours, Linus Walleij ^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH 5/8] drivers/pinctrl: make stm32/pinctrl-stm32f429.c explicitly non-modular 2016-02-29 20:48 [PATCH 0/8] drivers/pinctrl: remove truly orphaned module code Paul Gortmaker ` (3 preceding siblings ...) 2016-02-29 20:48 ` [PATCH 4/8] drivers/pinctrl: make sh-pfc/core.c " Paul Gortmaker @ 2016-02-29 20:48 ` Paul Gortmaker 2016-03-01 9:01 ` Maxime Coquelin 2016-03-09 3:25 ` Linus Walleij 2016-02-29 20:48 ` [PATCH 6/8] drivers/pinctrl: make sunxi/pinctrl-sun[4-9]* " Paul Gortmaker ` (2 subsequent siblings) 7 siblings, 2 replies; 25+ messages in thread From: Paul Gortmaker @ 2016-02-29 20:48 UTC (permalink / raw) To: linux-kernel Cc: linux-gpio, Linus Walleij, Patrice Chotard, Paul Gortmaker, Maxime Coquelin, linux-arm-kernel The Kconfig currently controlling compilation of this code is: drivers/pinctrl/stm32/Kconfig:config PINCTRL_STM32F429 drivers/pinctrl/stm32/Kconfig: bool "STMicroelectronics STM32F429 pin control" if COMPILE_TEST && !MACH_STM32F429 ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. Since module_init translates to device_initcall in the non-modular case, the init ordering remains unchanged with this commit. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com> Cc: Patrice Chotard <patrice.chotard@st.com> Cc: linux-gpio@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> --- drivers/pinctrl/stm32/pinctrl-stm32f429.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/pinctrl/stm32/pinctrl-stm32f429.c b/drivers/pinctrl/stm32/pinctrl-stm32f429.c index f34016b51375..e9b15dc0654b 100644 --- a/drivers/pinctrl/stm32/pinctrl-stm32f429.c +++ b/drivers/pinctrl/stm32/pinctrl-stm32f429.c @@ -4,7 +4,6 @@ * License terms: GNU General Public License (GPL), version 2 */ #include <linux/init.h> -#include <linux/module.h> #include <linux/of.h> #include <linux/platform_device.h> @@ -1576,7 +1575,6 @@ static const struct of_device_id stm32f429_pctrl_match[] = { }, { } }; -MODULE_DEVICE_TABLE(of, stm32f429_pctrl_match); static struct platform_driver stm32f429_pinctrl_driver = { .probe = stm32_pctl_probe, @@ -1590,9 +1588,4 @@ static int __init stm32f429_pinctrl_init(void) { return platform_driver_register(&stm32f429_pinctrl_driver); } - -module_init(stm32f429_pinctrl_init); - -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("STM32F429 Pinctrl Driver"); -MODULE_AUTHOR("Maxime Coquelin <mcoquelin.stm32@gmail.com>"); +device_initcall(stm32f429_pinctrl_init); -- 2.6.1 ^ permalink raw reply related [flat|nested] 25+ messages in thread
* Re: [PATCH 5/8] drivers/pinctrl: make stm32/pinctrl-stm32f429.c explicitly non-modular 2016-02-29 20:48 ` [PATCH 5/8] drivers/pinctrl: make stm32/pinctrl-stm32f429.c " Paul Gortmaker @ 2016-03-01 9:01 ` Maxime Coquelin 2016-03-09 3:25 ` Linus Walleij 1 sibling, 0 replies; 25+ messages in thread From: Maxime Coquelin @ 2016-03-01 9:01 UTC (permalink / raw) To: Paul Gortmaker Cc: linux-kernel@vger.kernel.org, Linus Walleij, Patrice Chotard, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org 2016-02-29 21:48 GMT+01:00 Paul Gortmaker <paul.gortmaker@windriver.com>: > The Kconfig currently controlling compilation of this code is: > > drivers/pinctrl/stm32/Kconfig:config PINCTRL_STM32F429 > drivers/pinctrl/stm32/Kconfig: bool "STMicroelectronics STM32F429 pin control" if COMPILE_TEST && !MACH_STM32F429 > > ...meaning that it currently is not being built as a module by anyone. > > Lets remove the modular code that is essentially orphaned, so that > when reading the driver there is no doubt it is builtin-only. > > Since module_init translates to device_initcall in the non-modular > case, the init ordering remains unchanged with this commit. > > Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. > > We also delete the MODULE_LICENSE tag etc. since all that information > is already contained at the top of the file in the comments. > > Cc: Linus Walleij <linus.walleij@linaro.org> > Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com> > Cc: Patrice Chotard <patrice.chotard@st.com> > Cc: linux-gpio@vger.kernel.org > Cc: linux-arm-kernel@lists.infradead.org > Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> > --- > drivers/pinctrl/stm32/pinctrl-stm32f429.c | 9 +-------- > 1 file changed, 1 insertion(+), 8 deletions(-) Thanks for the patch: Acked-by: Maxime Coquelin <mcoquelin.stm32@gmail.com> Regards, Maxime ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 5/8] drivers/pinctrl: make stm32/pinctrl-stm32f429.c explicitly non-modular 2016-02-29 20:48 ` [PATCH 5/8] drivers/pinctrl: make stm32/pinctrl-stm32f429.c " Paul Gortmaker 2016-03-01 9:01 ` Maxime Coquelin @ 2016-03-09 3:25 ` Linus Walleij 1 sibling, 0 replies; 25+ messages in thread From: Linus Walleij @ 2016-03-09 3:25 UTC (permalink / raw) To: Paul Gortmaker Cc: linux-kernel@vger.kernel.org, Maxime Coquelin, Patrice Chotard, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org On Tue, Mar 1, 2016 at 3:48 AM, Paul Gortmaker <paul.gortmaker@windriver.com> wrote: > The Kconfig currently controlling compilation of this code is: > > drivers/pinctrl/stm32/Kconfig:config PINCTRL_STM32F429 > drivers/pinctrl/stm32/Kconfig: bool "STMicroelectronics STM32F429 pin control" if COMPILE_TEST && !MACH_STM32F429 > > ...meaning that it currently is not being built as a module by anyone. > > Lets remove the modular code that is essentially orphaned, so that > when reading the driver there is no doubt it is builtin-only. > > Since module_init translates to device_initcall in the non-modular > case, the init ordering remains unchanged with this commit. > > Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. > > We also delete the MODULE_LICENSE tag etc. since all that information > is already contained at the top of the file in the comments. > > Cc: Linus Walleij <linus.walleij@linaro.org> > Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com> > Cc: Patrice Chotard <patrice.chotard@st.com> > Cc: linux-gpio@vger.kernel.org > Cc: linux-arm-kernel@lists.infradead.org > Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Patch applied with Maxime's ACK. Yours, Linus Walleij ^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH 6/8] drivers/pinctrl: make sunxi/pinctrl-sun[4-9]* explicitly non-modular 2016-02-29 20:48 [PATCH 0/8] drivers/pinctrl: remove truly orphaned module code Paul Gortmaker ` (4 preceding siblings ...) 2016-02-29 20:48 ` [PATCH 5/8] drivers/pinctrl: make stm32/pinctrl-stm32f429.c " Paul Gortmaker @ 2016-02-29 20:48 ` Paul Gortmaker 2016-03-01 7:14 ` Maxime Ripard 2016-02-29 20:48 ` [PATCH 7/8] drivers/pinctrl: make sunxi/pinctrl-sun9i-a80-r.c " Paul Gortmaker 2016-02-29 20:48 ` [PATCH 8/8] drivers/pinctrl: clean up samsung modular vs. non-modular distinctions Paul Gortmaker 7 siblings, 1 reply; 25+ messages in thread From: Paul Gortmaker @ 2016-02-29 20:48 UTC (permalink / raw) To: linux-kernel Cc: Paul Gortmaker, Boris Brezillon, Chen-Yu Tsai, Hans de Goede, Maxime Ripard, Vishnu Patekar, linux-gpio, linux-arm-kernel None of the Kconfigs for any of these drivers are tristate, meaning that they currently are not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the drivers there is no doubt they are builtin-only. All drivers get the exact same change, so they are handled in batch. Changes are (1) use builtin_platform_driver, (2) use init.h header (3) delete module_exit related code, (4) delete MODULE_DEVICE_TABLE, and (5) delete MODULE_LICENCE/MODULE_AUTHOR and associated tags. Since module_platform_driver() uses the same init level priority as builtin_platform_driver() the init ordering remains unchanged with this commit. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE etc. tags since all that information is already contained at the top of each file in the comments. Cc: Boris Brezillon <boris.brezillon@free-electrons.com> Cc: Chen-Yu Tsai <wens@csie.org> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Maxime Ripard <maxime.ripard@free-electrons.com> Cc: Vishnu Patekar <vishnupatekar0510@gmail.com> Cc: linux-gpio@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> --- drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c | 9 ++------- drivers/pinctrl/sunxi/pinctrl-sun5i-a10s.c | 9 ++------- drivers/pinctrl/sunxi/pinctrl-sun5i-a13.c | 9 ++------- drivers/pinctrl/sunxi/pinctrl-sun6i-a31-r.c | 10 ++-------- drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c | 9 ++------- drivers/pinctrl/sunxi/pinctrl-sun6i-a31s.c | 9 ++------- drivers/pinctrl/sunxi/pinctrl-sun7i-a20.c | 9 ++------- drivers/pinctrl/sunxi/pinctrl-sun8i-a23-r.c | 11 ++--------- drivers/pinctrl/sunxi/pinctrl-sun8i-a23.c | 10 ++-------- drivers/pinctrl/sunxi/pinctrl-sun8i-a33.c | 9 ++------- drivers/pinctrl/sunxi/pinctrl-sun9i-a80.c | 9 ++------- 11 files changed, 22 insertions(+), 81 deletions(-) diff --git a/drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c b/drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c index 862a096c5dba..fb30b86a97ee 100644 --- a/drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c +++ b/drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c @@ -10,7 +10,7 @@ * warranty of any kind, whether express or implied. */ -#include <linux/module.h> +#include <linux/init.h> #include <linux/platform_device.h> #include <linux/of.h> #include <linux/of_device.h> @@ -1035,7 +1035,6 @@ static const struct of_device_id sun4i_a10_pinctrl_match[] = { { .compatible = "allwinner,sun4i-a10-pinctrl", }, {} }; -MODULE_DEVICE_TABLE(of, sun4i_a10_pinctrl_match); static struct platform_driver sun4i_a10_pinctrl_driver = { .probe = sun4i_a10_pinctrl_probe, @@ -1044,8 +1043,4 @@ static struct platform_driver sun4i_a10_pinctrl_driver = { .of_match_table = sun4i_a10_pinctrl_match, }, }; -module_platform_driver(sun4i_a10_pinctrl_driver); - -MODULE_AUTHOR("Maxime Ripard <maxime.ripard@free-electrons.com"); -MODULE_DESCRIPTION("Allwinner A10 pinctrl driver"); -MODULE_LICENSE("GPL"); +builtin_platform_driver(sun4i_a10_pinctrl_driver); diff --git a/drivers/pinctrl/sunxi/pinctrl-sun5i-a10s.c b/drivers/pinctrl/sunxi/pinctrl-sun5i-a10s.c index f9a3f8f446f7..a5b57fdff9e1 100644 --- a/drivers/pinctrl/sunxi/pinctrl-sun5i-a10s.c +++ b/drivers/pinctrl/sunxi/pinctrl-sun5i-a10s.c @@ -10,7 +10,7 @@ * warranty of any kind, whether express or implied. */ -#include <linux/module.h> +#include <linux/init.h> #include <linux/platform_device.h> #include <linux/of.h> #include <linux/of_device.h> @@ -674,7 +674,6 @@ static const struct of_device_id sun5i_a10s_pinctrl_match[] = { { .compatible = "allwinner,sun5i-a10s-pinctrl", }, {} }; -MODULE_DEVICE_TABLE(of, sun5i_a10s_pinctrl_match); static struct platform_driver sun5i_a10s_pinctrl_driver = { .probe = sun5i_a10s_pinctrl_probe, @@ -683,8 +682,4 @@ static struct platform_driver sun5i_a10s_pinctrl_driver = { .of_match_table = sun5i_a10s_pinctrl_match, }, }; -module_platform_driver(sun5i_a10s_pinctrl_driver); - -MODULE_AUTHOR("Maxime Ripard <maxime.ripard@free-electrons.com"); -MODULE_DESCRIPTION("Allwinner A10s pinctrl driver"); -MODULE_LICENSE("GPL"); +builtin_platform_driver(sun5i_a10s_pinctrl_driver); diff --git a/drivers/pinctrl/sunxi/pinctrl-sun5i-a13.c b/drivers/pinctrl/sunxi/pinctrl-sun5i-a13.c index 2bb07b38834f..8575f3f6d3dd 100644 --- a/drivers/pinctrl/sunxi/pinctrl-sun5i-a13.c +++ b/drivers/pinctrl/sunxi/pinctrl-sun5i-a13.c @@ -10,7 +10,7 @@ * warranty of any kind, whether express or implied. */ -#include <linux/module.h> +#include <linux/init.h> #include <linux/platform_device.h> #include <linux/of.h> #include <linux/of_device.h> @@ -392,7 +392,6 @@ static const struct of_device_id sun5i_a13_pinctrl_match[] = { { .compatible = "allwinner,sun5i-a13-pinctrl", }, {} }; -MODULE_DEVICE_TABLE(of, sun5i_a13_pinctrl_match); static struct platform_driver sun5i_a13_pinctrl_driver = { .probe = sun5i_a13_pinctrl_probe, @@ -401,8 +400,4 @@ static struct platform_driver sun5i_a13_pinctrl_driver = { .of_match_table = sun5i_a13_pinctrl_match, }, }; -module_platform_driver(sun5i_a13_pinctrl_driver); - -MODULE_AUTHOR("Maxime Ripard <maxime.ripard@free-electrons.com"); -MODULE_DESCRIPTION("Allwinner A13 pinctrl driver"); -MODULE_LICENSE("GPL"); +builtin_platform_driver(sun5i_a13_pinctrl_driver); diff --git a/drivers/pinctrl/sunxi/pinctrl-sun6i-a31-r.c b/drivers/pinctrl/sunxi/pinctrl-sun6i-a31-r.c index d4bc4f0e8be0..a22bd88a1f03 100644 --- a/drivers/pinctrl/sunxi/pinctrl-sun6i-a31-r.c +++ b/drivers/pinctrl/sunxi/pinctrl-sun6i-a31-r.c @@ -12,7 +12,7 @@ * warranty of any kind, whether express or implied. */ -#include <linux/module.h> +#include <linux/init.h> #include <linux/platform_device.h> #include <linux/of.h> #include <linux/of_device.h> @@ -136,7 +136,6 @@ static const struct of_device_id sun6i_a31_r_pinctrl_match[] = { { .compatible = "allwinner,sun6i-a31-r-pinctrl", }, {} }; -MODULE_DEVICE_TABLE(of, sun6i_a31_r_pinctrl_match); static struct platform_driver sun6i_a31_r_pinctrl_driver = { .probe = sun6i_a31_r_pinctrl_probe, @@ -145,9 +144,4 @@ static struct platform_driver sun6i_a31_r_pinctrl_driver = { .of_match_table = sun6i_a31_r_pinctrl_match, }, }; -module_platform_driver(sun6i_a31_r_pinctrl_driver); - -MODULE_AUTHOR("Boris Brezillon <boris.brezillon@free-electrons.com"); -MODULE_AUTHOR("Maxime Ripard <maxime.ripard@free-electrons.com"); -MODULE_DESCRIPTION("Allwinner A31 R_PIO pinctrl driver"); -MODULE_LICENSE("GPL"); +builtin_platform_driver(sun6i_a31_r_pinctrl_driver); diff --git a/drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c b/drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c index 022863ab0c58..508ec54897ae 100644 --- a/drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c +++ b/drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c @@ -10,7 +10,7 @@ * warranty of any kind, whether express or implied. */ -#include <linux/module.h> +#include <linux/init.h> #include <linux/platform_device.h> #include <linux/of.h> #include <linux/of_device.h> @@ -926,7 +926,6 @@ static const struct of_device_id sun6i_a31_pinctrl_match[] = { { .compatible = "allwinner,sun6i-a31-pinctrl", }, {} }; -MODULE_DEVICE_TABLE(of, sun6i_a31_pinctrl_match); static struct platform_driver sun6i_a31_pinctrl_driver = { .probe = sun6i_a31_pinctrl_probe, @@ -935,8 +934,4 @@ static struct platform_driver sun6i_a31_pinctrl_driver = { .of_match_table = sun6i_a31_pinctrl_match, }, }; -module_platform_driver(sun6i_a31_pinctrl_driver); - -MODULE_AUTHOR("Maxime Ripard <maxime.ripard@free-electrons.com"); -MODULE_DESCRIPTION("Allwinner A31 pinctrl driver"); -MODULE_LICENSE("GPL"); +builtin_platform_driver(sun6i_a31_pinctrl_driver); diff --git a/drivers/pinctrl/sunxi/pinctrl-sun6i-a31s.c b/drivers/pinctrl/sunxi/pinctrl-sun6i-a31s.c index e570d5c93ecc..231a746a5356 100644 --- a/drivers/pinctrl/sunxi/pinctrl-sun6i-a31s.c +++ b/drivers/pinctrl/sunxi/pinctrl-sun6i-a31s.c @@ -11,7 +11,7 @@ * warranty of any kind, whether express or implied. */ -#include <linux/module.h> +#include <linux/init.h> #include <linux/platform_device.h> #include <linux/of.h> #include <linux/of_device.h> @@ -798,7 +798,6 @@ static const struct of_device_id sun6i_a31s_pinctrl_match[] = { { .compatible = "allwinner,sun6i-a31s-pinctrl", }, {} }; -MODULE_DEVICE_TABLE(of, sun6i_a31s_pinctrl_match); static struct platform_driver sun6i_a31s_pinctrl_driver = { .probe = sun6i_a31s_pinctrl_probe, @@ -807,8 +806,4 @@ static struct platform_driver sun6i_a31s_pinctrl_driver = { .of_match_table = sun6i_a31s_pinctrl_match, }, }; -module_platform_driver(sun6i_a31s_pinctrl_driver); - -MODULE_AUTHOR("Hans de Goede <hdegoede@redhat.com>"); -MODULE_DESCRIPTION("Allwinner A31s pinctrl driver"); -MODULE_LICENSE("GPL"); +builtin_platform_driver(sun6i_a31s_pinctrl_driver); diff --git a/drivers/pinctrl/sunxi/pinctrl-sun7i-a20.c b/drivers/pinctrl/sunxi/pinctrl-sun7i-a20.c index cf1ce0c02600..052f658c53c7 100644 --- a/drivers/pinctrl/sunxi/pinctrl-sun7i-a20.c +++ b/drivers/pinctrl/sunxi/pinctrl-sun7i-a20.c @@ -10,7 +10,7 @@ * warranty of any kind, whether express or implied. */ -#include <linux/module.h> +#include <linux/init.h> #include <linux/platform_device.h> #include <linux/of.h> #include <linux/of_device.h> @@ -1049,7 +1049,6 @@ static const struct of_device_id sun7i_a20_pinctrl_match[] = { { .compatible = "allwinner,sun7i-a20-pinctrl", }, {} }; -MODULE_DEVICE_TABLE(of, sun7i_a20_pinctrl_match); static struct platform_driver sun7i_a20_pinctrl_driver = { .probe = sun7i_a20_pinctrl_probe, @@ -1058,8 +1057,4 @@ static struct platform_driver sun7i_a20_pinctrl_driver = { .of_match_table = sun7i_a20_pinctrl_match, }, }; -module_platform_driver(sun7i_a20_pinctrl_driver); - -MODULE_AUTHOR("Maxime Ripard <maxime.ripard@free-electrons.com"); -MODULE_DESCRIPTION("Allwinner A20 pinctrl driver"); -MODULE_LICENSE("GPL"); +builtin_platform_driver(sun7i_a20_pinctrl_driver); diff --git a/drivers/pinctrl/sunxi/pinctrl-sun8i-a23-r.c b/drivers/pinctrl/sunxi/pinctrl-sun8i-a23-r.c index 056287635873..2292e05a397b 100644 --- a/drivers/pinctrl/sunxi/pinctrl-sun8i-a23-r.c +++ b/drivers/pinctrl/sunxi/pinctrl-sun8i-a23-r.c @@ -15,7 +15,7 @@ * warranty of any kind, whether express or implied. */ -#include <linux/module.h> +#include <linux/init.h> #include <linux/platform_device.h> #include <linux/of.h> #include <linux/of_device.h> @@ -123,7 +123,6 @@ static const struct of_device_id sun8i_a23_r_pinctrl_match[] = { { .compatible = "allwinner,sun8i-a23-r-pinctrl", }, {} }; -MODULE_DEVICE_TABLE(of, sun8i_a23_r_pinctrl_match); static struct platform_driver sun8i_a23_r_pinctrl_driver = { .probe = sun8i_a23_r_pinctrl_probe, @@ -132,10 +131,4 @@ static struct platform_driver sun8i_a23_r_pinctrl_driver = { .of_match_table = sun8i_a23_r_pinctrl_match, }, }; -module_platform_driver(sun8i_a23_r_pinctrl_driver); - -MODULE_AUTHOR("Chen-Yu Tsai <wens@csie.org>"); -MODULE_AUTHOR("Boris Brezillon <boris.brezillon@free-electrons.com"); -MODULE_AUTHOR("Maxime Ripard <maxime.ripard@free-electrons.com"); -MODULE_DESCRIPTION("Allwinner A23 R_PIO pinctrl driver"); -MODULE_LICENSE("GPL"); +builtin_platform_driver(sun8i_a23_r_pinctrl_driver); diff --git a/drivers/pinctrl/sunxi/pinctrl-sun8i-a23.c b/drivers/pinctrl/sunxi/pinctrl-sun8i-a23.c index 55083d278bb1..29d307b3c3ec 100644 --- a/drivers/pinctrl/sunxi/pinctrl-sun8i-a23.c +++ b/drivers/pinctrl/sunxi/pinctrl-sun8i-a23.c @@ -14,7 +14,7 @@ * warranty of any kind, whether express or implied. */ -#include <linux/module.h> +#include <linux/init.h> #include <linux/platform_device.h> #include <linux/of.h> #include <linux/of_device.h> @@ -575,7 +575,6 @@ static const struct of_device_id sun8i_a23_pinctrl_match[] = { { .compatible = "allwinner,sun8i-a23-pinctrl", }, {} }; -MODULE_DEVICE_TABLE(of, sun8i_a23_pinctrl_match); static struct platform_driver sun8i_a23_pinctrl_driver = { .probe = sun8i_a23_pinctrl_probe, @@ -584,9 +583,4 @@ static struct platform_driver sun8i_a23_pinctrl_driver = { .of_match_table = sun8i_a23_pinctrl_match, }, }; -module_platform_driver(sun8i_a23_pinctrl_driver); - -MODULE_AUTHOR("Chen-Yu Tsai <wens@csie.org>"); -MODULE_AUTHOR("Maxime Ripard <maxime.ripard@free-electrons.com"); -MODULE_DESCRIPTION("Allwinner A23 pinctrl driver"); -MODULE_LICENSE("GPL"); +builtin_platform_driver(sun8i_a23_pinctrl_driver); diff --git a/drivers/pinctrl/sunxi/pinctrl-sun8i-a33.c b/drivers/pinctrl/sunxi/pinctrl-sun8i-a33.c index 00265f0435a7..9112922d9492 100644 --- a/drivers/pinctrl/sunxi/pinctrl-sun8i-a33.c +++ b/drivers/pinctrl/sunxi/pinctrl-sun8i-a33.c @@ -12,7 +12,7 @@ * warranty of any kind, whether express or implied. */ -#include <linux/module.h> +#include <linux/init.h> #include <linux/platform_device.h> #include <linux/of.h> #include <linux/of_device.h> @@ -497,7 +497,6 @@ static const struct of_device_id sun8i_a33_pinctrl_match[] = { { .compatible = "allwinner,sun8i-a33-pinctrl", }, {} }; -MODULE_DEVICE_TABLE(of, sun8i_a33_pinctrl_match); static struct platform_driver sun8i_a33_pinctrl_driver = { .probe = sun8i_a33_pinctrl_probe, @@ -506,8 +505,4 @@ static struct platform_driver sun8i_a33_pinctrl_driver = { .of_match_table = sun8i_a33_pinctrl_match, }, }; -module_platform_driver(sun8i_a33_pinctrl_driver); - -MODULE_AUTHOR("Vishnu Patekar <vishnupatekar0510@gmail.com>"); -MODULE_DESCRIPTION("Allwinner a33 pinctrl driver"); -MODULE_LICENSE("GPL"); +builtin_platform_driver(sun8i_a33_pinctrl_driver); diff --git a/drivers/pinctrl/sunxi/pinctrl-sun9i-a80.c b/drivers/pinctrl/sunxi/pinctrl-sun9i-a80.c index 1b580ba76453..bc14e954d7a2 100644 --- a/drivers/pinctrl/sunxi/pinctrl-sun9i-a80.c +++ b/drivers/pinctrl/sunxi/pinctrl-sun9i-a80.c @@ -10,7 +10,7 @@ * warranty of any kind, whether express or implied. */ -#include <linux/module.h> +#include <linux/init.h> #include <linux/platform_device.h> #include <linux/of.h> #include <linux/of_device.h> @@ -733,7 +733,6 @@ static const struct of_device_id sun9i_a80_pinctrl_match[] = { { .compatible = "allwinner,sun9i-a80-pinctrl", }, {} }; -MODULE_DEVICE_TABLE(of, sun9i_a80_pinctrl_match); static struct platform_driver sun9i_a80_pinctrl_driver = { .probe = sun9i_a80_pinctrl_probe, @@ -742,8 +741,4 @@ static struct platform_driver sun9i_a80_pinctrl_driver = { .of_match_table = sun9i_a80_pinctrl_match, }, }; -module_platform_driver(sun9i_a80_pinctrl_driver); - -MODULE_AUTHOR("Maxime Ripard <maxime.ripard@free-electrons.com>"); -MODULE_DESCRIPTION("Allwinner A80 pinctrl driver"); -MODULE_LICENSE("GPL"); +builtin_platform_driver(sun9i_a80_pinctrl_driver); -- 2.6.1 ^ permalink raw reply related [flat|nested] 25+ messages in thread
* Re: [PATCH 6/8] drivers/pinctrl: make sunxi/pinctrl-sun[4-9]* explicitly non-modular 2016-02-29 20:48 ` [PATCH 6/8] drivers/pinctrl: make sunxi/pinctrl-sun[4-9]* " Paul Gortmaker @ 2016-03-01 7:14 ` Maxime Ripard 0 siblings, 0 replies; 25+ messages in thread From: Maxime Ripard @ 2016-03-01 7:14 UTC (permalink / raw) To: Paul Gortmaker Cc: linux-kernel, Boris Brezillon, Chen-Yu Tsai, Hans de Goede, Vishnu Patekar, linux-gpio, linux-arm-kernel [-- Attachment #1: Type: text/plain, Size: 1598 bytes --] On Mon, Feb 29, 2016 at 03:48:42PM -0500, Paul Gortmaker wrote: > None of the Kconfigs for any of these drivers are tristate, > meaning that they currently are not being built as a module by anyone. > > Lets remove the modular code that is essentially orphaned, so that > when reading the drivers there is no doubt they are builtin-only. All > drivers get the exact same change, so they are handled in batch. > > Changes are (1) use builtin_platform_driver, (2) use init.h header > (3) delete module_exit related code, (4) delete MODULE_DEVICE_TABLE, > and (5) delete MODULE_LICENCE/MODULE_AUTHOR and associated tags. > > Since module_platform_driver() uses the same init level priority as > builtin_platform_driver() the init ordering remains unchanged with > this commit. > > Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. > > We also delete the MODULE_LICENSE etc. tags since all that information > is already contained at the top of each file in the comments. > > Cc: Boris Brezillon <boris.brezillon@free-electrons.com> > Cc: Chen-Yu Tsai <wens@csie.org> > Cc: Hans de Goede <hdegoede@redhat.com> > Cc: Maxime Ripard <maxime.ripard@free-electrons.com> > Cc: Vishnu Patekar <vishnupatekar0510@gmail.com> > Cc: linux-gpio@vger.kernel.org > Cc: linux-arm-kernel@lists.infradead.org > Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Thanks! Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH 7/8] drivers/pinctrl: make sunxi/pinctrl-sun9i-a80-r.c explicitly non-modular 2016-02-29 20:48 [PATCH 0/8] drivers/pinctrl: remove truly orphaned module code Paul Gortmaker ` (5 preceding siblings ...) 2016-02-29 20:48 ` [PATCH 6/8] drivers/pinctrl: make sunxi/pinctrl-sun[4-9]* " Paul Gortmaker @ 2016-02-29 20:48 ` Paul Gortmaker 2016-03-01 7:14 ` Maxime Ripard 2016-03-09 3:28 ` Linus Walleij 2016-02-29 20:48 ` [PATCH 8/8] drivers/pinctrl: clean up samsung modular vs. non-modular distinctions Paul Gortmaker 7 siblings, 2 replies; 25+ messages in thread From: Paul Gortmaker @ 2016-02-29 20:48 UTC (permalink / raw) To: linux-kernel Cc: Paul Gortmaker, Linus Walleij, Maxime Ripard, Chen-Yu Tsai, linux-gpio, linux-arm-kernel The Kconfig currently controlling compilation of this code is: drivers/pinctrl/sunxi/Kconfig:config PINCTRL_SUN9I_A80_R drivers/pinctrl/sunxi/Kconfig: def_bool MACH_SUN9I ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. Since module_platform_driver() uses the same init level priority as builtin_platform_driver() the init ordering remains unchanged with this commit. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Maxime Ripard <maxime.ripard@free-electrons.com> Cc: Chen-Yu Tsai <wens@csie.org> Cc: linux-gpio@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> --- drivers/pinctrl/sunxi/pinctrl-sun9i-a80-r.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/pinctrl/sunxi/pinctrl-sun9i-a80-r.c b/drivers/pinctrl/sunxi/pinctrl-sun9i-a80-r.c index 42547ffa20a8..92a873f73697 100644 --- a/drivers/pinctrl/sunxi/pinctrl-sun9i-a80-r.c +++ b/drivers/pinctrl/sunxi/pinctrl-sun9i-a80-r.c @@ -9,7 +9,7 @@ * warranty of any kind, whether express or implied. */ -#include <linux/module.h> +#include <linux/init.h> #include <linux/platform_device.h> #include <linux/of.h> #include <linux/of_device.h> @@ -164,7 +164,6 @@ static const struct of_device_id sun9i_a80_r_pinctrl_match[] = { { .compatible = "allwinner,sun9i-a80-r-pinctrl", }, {} }; -MODULE_DEVICE_TABLE(of, sun9i_a80_r_pinctrl_match); static struct platform_driver sun9i_a80_r_pinctrl_driver = { .probe = sun9i_a80_r_pinctrl_probe, @@ -174,8 +173,4 @@ static struct platform_driver sun9i_a80_r_pinctrl_driver = { .of_match_table = sun9i_a80_r_pinctrl_match, }, }; -module_platform_driver(sun9i_a80_r_pinctrl_driver); - -MODULE_AUTHOR("Maxime Ripard <maxime.ripard@free-electrons.com"); -MODULE_DESCRIPTION("Allwinner A80 R_PIO pinctrl driver"); -MODULE_LICENSE("GPL"); +builtin_platform_driver(sun9i_a80_r_pinctrl_driver); -- 2.6.1 ^ permalink raw reply related [flat|nested] 25+ messages in thread
* Re: [PATCH 7/8] drivers/pinctrl: make sunxi/pinctrl-sun9i-a80-r.c explicitly non-modular 2016-02-29 20:48 ` [PATCH 7/8] drivers/pinctrl: make sunxi/pinctrl-sun9i-a80-r.c " Paul Gortmaker @ 2016-03-01 7:14 ` Maxime Ripard 2016-03-09 3:28 ` Linus Walleij 1 sibling, 0 replies; 25+ messages in thread From: Maxime Ripard @ 2016-03-01 7:14 UTC (permalink / raw) To: Paul Gortmaker Cc: linux-kernel, Linus Walleij, Chen-Yu Tsai, linux-gpio, linux-arm-kernel [-- Attachment #1: Type: text/plain, Size: 1324 bytes --] On Mon, Feb 29, 2016 at 03:48:43PM -0500, Paul Gortmaker wrote: > The Kconfig currently controlling compilation of this code is: > > drivers/pinctrl/sunxi/Kconfig:config PINCTRL_SUN9I_A80_R > drivers/pinctrl/sunxi/Kconfig: def_bool MACH_SUN9I > > ...meaning that it currently is not being built as a module by anyone. > > Lets remove the modular code that is essentially orphaned, so that > when reading the driver there is no doubt it is builtin-only. > > Since module_platform_driver() uses the same init level priority as > builtin_platform_driver() the init ordering remains unchanged with > this commit. > > Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. > > We also delete the MODULE_LICENSE tag etc. since all that information > is already contained at the top of the file in the comments. > > Cc: Linus Walleij <linus.walleij@linaro.org> > Cc: Maxime Ripard <maxime.ripard@free-electrons.com> > Cc: Chen-Yu Tsai <wens@csie.org> > Cc: linux-gpio@vger.kernel.org > Cc: linux-arm-kernel@lists.infradead.org > Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Thanks! Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 7/8] drivers/pinctrl: make sunxi/pinctrl-sun9i-a80-r.c explicitly non-modular 2016-02-29 20:48 ` [PATCH 7/8] drivers/pinctrl: make sunxi/pinctrl-sun9i-a80-r.c " Paul Gortmaker 2016-03-01 7:14 ` Maxime Ripard @ 2016-03-09 3:28 ` Linus Walleij 1 sibling, 0 replies; 25+ messages in thread From: Linus Walleij @ 2016-03-09 3:28 UTC (permalink / raw) To: Paul Gortmaker Cc: linux-kernel@vger.kernel.org, Maxime Ripard, Chen-Yu Tsai, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org On Tue, Mar 1, 2016 at 3:48 AM, Paul Gortmaker <paul.gortmaker@windriver.com> wrote: > The Kconfig currently controlling compilation of this code is: > > drivers/pinctrl/sunxi/Kconfig:config PINCTRL_SUN9I_A80_R > drivers/pinctrl/sunxi/Kconfig: def_bool MACH_SUN9I > > ...meaning that it currently is not being built as a module by anyone. > > Lets remove the modular code that is essentially orphaned, so that > when reading the driver there is no doubt it is builtin-only. > > Since module_platform_driver() uses the same init level priority as > builtin_platform_driver() the init ordering remains unchanged with > this commit. > > Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. > > We also delete the MODULE_LICENSE tag etc. since all that information > is already contained at the top of the file in the comments. > > Cc: Linus Walleij <linus.walleij@linaro.org> > Cc: Maxime Ripard <maxime.ripard@free-electrons.com> > Cc: Chen-Yu Tsai <wens@csie.org> > Cc: linux-gpio@vger.kernel.org > Cc: linux-arm-kernel@lists.infradead.org > Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Patch applied with Maxime's ACK. Yours, Linus Walleij ^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH 8/8] drivers/pinctrl: clean up samsung modular vs. non-modular distinctions 2016-02-29 20:48 [PATCH 0/8] drivers/pinctrl: remove truly orphaned module code Paul Gortmaker ` (6 preceding siblings ...) 2016-02-29 20:48 ` [PATCH 7/8] drivers/pinctrl: make sunxi/pinctrl-sun9i-a80-r.c " Paul Gortmaker @ 2016-02-29 20:48 ` Paul Gortmaker 2016-03-15 8:50 ` Linus Walleij 2016-03-15 10:10 ` Sylwester Nawrocki 7 siblings, 2 replies; 25+ messages in thread From: Paul Gortmaker @ 2016-02-29 20:48 UTC (permalink / raw) To: linux-kernel Cc: Paul Gortmaker, Tomasz Figa, Thomas Abraham, Linus Walleij, linux-arm-kernel, linux-samsung-soc, linux-gpio Fixups here tend to be more all over the map vs. some of the other repeated/systematic ones we've seen elsewhere. We remove module.h from code that isn't doing anything modular at all; if they have __init sections, then replace it with init.h A couple drivers have module_exit() code that is essentially orphaned, and so we remove that. There are no module_init replacements, so we have no concerns wrt. initcall ordering changes as per some of the other cleanups. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information was (or is now) contained at the top of the file in the comments. Cc: Tomasz Figa <tomasz.figa@gmail.com> Cc: Thomas Abraham <thomas.ab@samsung.com> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Cc: linux-gpio@vger.kernel.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> --- drivers/pinctrl/samsung/pinctrl-exynos.c | 1 - drivers/pinctrl/samsung/pinctrl-exynos5440.c | 15 +++------------ drivers/pinctrl/samsung/pinctrl-s3c24xx.c | 2 +- drivers/pinctrl/samsung/pinctrl-s3c64xx.c | 2 +- drivers/pinctrl/samsung/pinctrl-samsung.c | 12 +----------- 5 files changed, 6 insertions(+), 26 deletions(-) diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.c b/drivers/pinctrl/samsung/pinctrl-exynos.c index 051b5bf701a8..428094e797bd 100644 --- a/drivers/pinctrl/samsung/pinctrl-exynos.c +++ b/drivers/pinctrl/samsung/pinctrl-exynos.c @@ -18,7 +18,6 @@ * external gpio and wakeup interrupt support. */ -#include <linux/module.h> #include <linux/device.h> #include <linux/interrupt.h> #include <linux/irqdomain.h> diff --git a/drivers/pinctrl/samsung/pinctrl-exynos5440.c b/drivers/pinctrl/samsung/pinctrl-exynos5440.c index 00ab63abf1d9..50cb7d3bb098 100644 --- a/drivers/pinctrl/samsung/pinctrl-exynos5440.c +++ b/drivers/pinctrl/samsung/pinctrl-exynos5440.c @@ -1,6 +1,8 @@ /* * pin-controller/pin-mux/pin-config/gpio-driver for Samsung's EXYNOS5440 SoC. * + * Author: Thomas Abraham <thomas.ab@samsung.com> + * * Copyright (c) 2012 Samsung Electronics Co., Ltd. * http://www.samsung.com * @@ -10,7 +12,7 @@ * (at your option) any later version. */ -#include <linux/module.h> +#include <linux/init.h> #include <linux/platform_device.h> #include <linux/io.h> #include <linux/slab.h> @@ -990,7 +992,6 @@ static const struct of_device_id exynos5440_pinctrl_dt_match[] = { { .compatible = "samsung,exynos5440-pinctrl" }, {}, }; -MODULE_DEVICE_TABLE(of, exynos5440_pinctrl_dt_match); static struct platform_driver exynos5440_pinctrl_driver = { .probe = exynos5440_pinctrl_probe, @@ -1005,13 +1006,3 @@ static int __init exynos5440_pinctrl_drv_register(void) return platform_driver_register(&exynos5440_pinctrl_driver); } postcore_initcall(exynos5440_pinctrl_drv_register); - -static void __exit exynos5440_pinctrl_drv_unregister(void) -{ - platform_driver_unregister(&exynos5440_pinctrl_driver); -} -module_exit(exynos5440_pinctrl_drv_unregister); - -MODULE_AUTHOR("Thomas Abraham <thomas.ab@samsung.com>"); -MODULE_DESCRIPTION("Samsung EXYNOS5440 SoC pinctrl driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/pinctrl/samsung/pinctrl-s3c24xx.c b/drivers/pinctrl/samsung/pinctrl-s3c24xx.c index 3d92f827da7a..edf27264b603 100644 --- a/drivers/pinctrl/samsung/pinctrl-s3c24xx.c +++ b/drivers/pinctrl/samsung/pinctrl-s3c24xx.c @@ -13,7 +13,7 @@ * external gpio and wakeup interrupt support. */ -#include <linux/module.h> +#include <linux/init.h> #include <linux/device.h> #include <linux/interrupt.h> #include <linux/irqdomain.h> diff --git a/drivers/pinctrl/samsung/pinctrl-s3c64xx.c b/drivers/pinctrl/samsung/pinctrl-s3c64xx.c index 43407ab248f5..5eda18297a4e 100644 --- a/drivers/pinctrl/samsung/pinctrl-s3c64xx.c +++ b/drivers/pinctrl/samsung/pinctrl-s3c64xx.c @@ -15,7 +15,7 @@ * external gpio and wakeup interrupt support. */ -#include <linux/module.h> +#include <linux/init.h> #include <linux/device.h> #include <linux/interrupt.h> #include <linux/irqdomain.h> diff --git a/drivers/pinctrl/samsung/pinctrl-samsung.c b/drivers/pinctrl/samsung/pinctrl-samsung.c index 5cc97f85db02..b698bfe1814f 100644 --- a/drivers/pinctrl/samsung/pinctrl-samsung.c +++ b/drivers/pinctrl/samsung/pinctrl-samsung.c @@ -20,7 +20,7 @@ * and wakeup interrupts can be hooked to. */ -#include <linux/module.h> +#include <linux/init.h> #include <linux/platform_device.h> #include <linux/io.h> #include <linux/slab.h> @@ -1289,13 +1289,3 @@ static int __init samsung_pinctrl_drv_register(void) return platform_driver_register(&samsung_pinctrl_driver); } postcore_initcall(samsung_pinctrl_drv_register); - -static void __exit samsung_pinctrl_drv_unregister(void) -{ - platform_driver_unregister(&samsung_pinctrl_driver); -} -module_exit(samsung_pinctrl_drv_unregister); - -MODULE_AUTHOR("Thomas Abraham <thomas.ab@samsung.com>"); -MODULE_DESCRIPTION("Samsung pinctrl driver"); -MODULE_LICENSE("GPL v2"); -- 2.6.1 ^ permalink raw reply related [flat|nested] 25+ messages in thread
* Re: [PATCH 8/8] drivers/pinctrl: clean up samsung modular vs. non-modular distinctions 2016-02-29 20:48 ` [PATCH 8/8] drivers/pinctrl: clean up samsung modular vs. non-modular distinctions Paul Gortmaker @ 2016-03-15 8:50 ` Linus Walleij 2016-03-15 13:20 ` Paul Gortmaker 2016-03-15 10:10 ` Sylwester Nawrocki 1 sibling, 1 reply; 25+ messages in thread From: Linus Walleij @ 2016-03-15 8:50 UTC (permalink / raw) To: Paul Gortmaker Cc: linux-kernel@vger.kernel.org, Tomasz Figa, Thomas Abraham, linux-arm-kernel@lists.infradead.org, linux-samsung-soc, linux-gpio@vger.kernel.org On Mon, Feb 29, 2016 at 9:48 PM, Paul Gortmaker <paul.gortmaker@windriver.com> wrote: > Fixups here tend to be more all over the map vs. some of the other > repeated/systematic ones we've seen elsewhere. > > We remove module.h from code that isn't doing anything modular at > all; if they have __init sections, then replace it with init.h > > A couple drivers have module_exit() code that is essentially orphaned, > and so we remove that. > > There are no module_init replacements, so we have no concerns wrt. > initcall ordering changes as per some of the other cleanups. > > Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. > > We also delete the MODULE_LICENSE tag etc. since all that information > was (or is now) contained at the top of the file in the comments. > > Cc: Tomasz Figa <tomasz.figa@gmail.com> > Cc: Thomas Abraham <thomas.ab@samsung.com> > Cc: Linus Walleij <linus.walleij@linaro.org> > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-samsung-soc@vger.kernel.org > Cc: linux-gpio@vger.kernel.org > Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> This didn't make it in for v4.6 because noone provided ACKs. Please resend the outstanding (rebased) demodularization patches after v4.6-rc1 and I will merge them no matter if I get ACKs or not, I will not wait for ACKs any longer than that. Yours, Linus Walleij ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 8/8] drivers/pinctrl: clean up samsung modular vs. non-modular distinctions 2016-03-15 8:50 ` Linus Walleij @ 2016-03-15 13:20 ` Paul Gortmaker 0 siblings, 0 replies; 25+ messages in thread From: Paul Gortmaker @ 2016-03-15 13:20 UTC (permalink / raw) To: Linus Walleij Cc: linux-kernel@vger.kernel.org, Tomasz Figa, Thomas Abraham, linux-arm-kernel@lists.infradead.org, linux-samsung-soc, linux-gpio@vger.kernel.org [Re: [PATCH 8/8] drivers/pinctrl: clean up samsung modular vs. non-modular distinctions] On 15/03/2016 (Tue 09:50) Linus Walleij wrote: > On Mon, Feb 29, 2016 at 9:48 PM, Paul Gortmaker > <paul.gortmaker@windriver.com> wrote: > > > Fixups here tend to be more all over the map vs. some of the other > > repeated/systematic ones we've seen elsewhere. > > > > We remove module.h from code that isn't doing anything modular at > > all; if they have __init sections, then replace it with init.h > > > > A couple drivers have module_exit() code that is essentially orphaned, > > and so we remove that. > > > > There are no module_init replacements, so we have no concerns wrt. > > initcall ordering changes as per some of the other cleanups. > > > > Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. > > > > We also delete the MODULE_LICENSE tag etc. since all that information > > was (or is now) contained at the top of the file in the comments. > > > > Cc: Tomasz Figa <tomasz.figa@gmail.com> > > Cc: Thomas Abraham <thomas.ab@samsung.com> > > Cc: Linus Walleij <linus.walleij@linaro.org> > > Cc: linux-arm-kernel@lists.infradead.org > > Cc: linux-samsung-soc@vger.kernel.org > > Cc: linux-gpio@vger.kernel.org > > Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> > > This didn't make it in for v4.6 because noone provided ACKs. > > Please resend the outstanding (rebased) demodularization patches > after v4.6-rc1 and I will merge them no matter if I get ACKs or not, > I will not wait for ACKs any longer than that. Sounds good, will do that in ~2 wks. Thanks, Paul. -- > > Yours, > Linus Walleij ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 8/8] drivers/pinctrl: clean up samsung modular vs. non-modular distinctions 2016-02-29 20:48 ` [PATCH 8/8] drivers/pinctrl: clean up samsung modular vs. non-modular distinctions Paul Gortmaker 2016-03-15 8:50 ` Linus Walleij @ 2016-03-15 10:10 ` Sylwester Nawrocki 1 sibling, 0 replies; 25+ messages in thread From: Sylwester Nawrocki @ 2016-03-15 10:10 UTC (permalink / raw) To: Paul Gortmaker Cc: linux-kernel, Tomasz Figa, Thomas Abraham, Linus Walleij, linux-arm-kernel, linux-samsung-soc, linux-gpio On 02/29/2016 09:48 PM, Paul Gortmaker wrote: > Fixups here tend to be more all over the map vs. some of the other > repeated/systematic ones we've seen elsewhere. > > We remove module.h from code that isn't doing anything modular at > all; if they have __init sections, then replace it with init.h > > A couple drivers have module_exit() code that is essentially orphaned, > and so we remove that. > > There are no module_init replacements, so we have no concerns wrt. > initcall ordering changes as per some of the other cleanups. > > Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. > > We also delete the MODULE_LICENSE tag etc. since all that information > was (or is now) contained at the top of the file in the comments. > > Cc: Tomasz Figa <tomasz.figa@gmail.com> > Cc: Thomas Abraham <thomas.ab@samsung.com> > Cc: Linus Walleij <linus.walleij@linaro.org> > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-samsung-soc@vger.kernel.org > Cc: linux-gpio@vger.kernel.org > Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> > --- > drivers/pinctrl/samsung/pinctrl-exynos.c | 1 - > drivers/pinctrl/samsung/pinctrl-exynos5440.c | 15 +++------------ > drivers/pinctrl/samsung/pinctrl-s3c24xx.c | 2 +- > drivers/pinctrl/samsung/pinctrl-s3c64xx.c | 2 +- > drivers/pinctrl/samsung/pinctrl-samsung.c | 12 +----------- > 5 files changed, 6 insertions(+), 26 deletions(-) Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com> -- Thanks, Sylwester ^ permalink raw reply [flat|nested] 25+ messages in thread
end of thread, other threads:[~2016-03-15 13:20 UTC | newest] Thread overview: 25+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-02-29 20:48 [PATCH 0/8] drivers/pinctrl: remove truly orphaned module code Paul Gortmaker 2016-02-29 20:48 ` [PATCH 1/8] drivers/pinctrl: sunxi/pinctrl-sunxi.c does not need module.h Paul Gortmaker 2016-03-01 7:13 ` Maxime Ripard 2016-03-09 2:59 ` Linus Walleij [not found] ` <1456778924-20730-1-git-send-email-paul.gortmaker-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org> 2016-02-29 20:48 ` [PATCH 2/8] drivers/pinctrl: make mediatek/pinctrl-mt6397 driver explicitly non-modular Paul Gortmaker [not found] ` <1456778924-20730-3-git-send-email-paul.gortmaker-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org> 2016-03-01 20:02 ` Hongzhou Yang 2016-03-09 3:01 ` Linus Walleij 2016-02-29 20:48 ` [PATCH 3/8] drivers/pinctrl: make meson/pinctrl-meson.c " Paul Gortmaker 2016-03-09 3:04 ` Linus Walleij 2016-02-29 20:48 ` [PATCH 4/8] drivers/pinctrl: make sh-pfc/core.c " Paul Gortmaker 2016-02-29 22:00 ` Laurent Pinchart 2016-03-02 11:05 ` Geert Uytterhoeven 2016-03-09 3:24 ` Linus Walleij 2016-02-29 20:48 ` [PATCH 5/8] drivers/pinctrl: make stm32/pinctrl-stm32f429.c " Paul Gortmaker 2016-03-01 9:01 ` Maxime Coquelin 2016-03-09 3:25 ` Linus Walleij 2016-02-29 20:48 ` [PATCH 6/8] drivers/pinctrl: make sunxi/pinctrl-sun[4-9]* " Paul Gortmaker 2016-03-01 7:14 ` Maxime Ripard 2016-02-29 20:48 ` [PATCH 7/8] drivers/pinctrl: make sunxi/pinctrl-sun9i-a80-r.c " Paul Gortmaker 2016-03-01 7:14 ` Maxime Ripard 2016-03-09 3:28 ` Linus Walleij 2016-02-29 20:48 ` [PATCH 8/8] drivers/pinctrl: clean up samsung modular vs. non-modular distinctions Paul Gortmaker 2016-03-15 8:50 ` Linus Walleij 2016-03-15 13:20 ` Paul Gortmaker 2016-03-15 10:10 ` Sylwester Nawrocki
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).