gpio: delete MODULE_ tags in non-modular drivers
Subsystems (2)
cover gpio: delete MODULE_ tags in non-modular drivers
A nice simple series, with zero runtime changes. We delete tags like MODULE_LICENSE, MODULE_AUTHOR (while ensuring the documentation at the top of file reflects author and license) etc from bool drivers where the tags are no-ops.
Then we are free to delete the module.h include, which we now know adds about 750kB of output to an otherwise headerless empty file processed by cpp. In addition, it will be clear that the driver is non-modular now, when inspecting the source code.
---
Paul Gortmaker (4):
gpio: msic: drop unused MODULE_ tags from non-modular code
gpio: mxc: drop unused MODULE_ tags from non-modular code
gpio: spear-spics: drop unused MODULE_ tags from non-modular code
gpio: vf610: drop unused MODULE_ tags from non-modular code
drivers/gpio/gpio-msic.c | 6 ------ drivers/gpio/gpio-mxc.c | 10 ++-------- drivers/gpio/gpio-spear-spics.c | 7 +------ drivers/gpio/gpio-vf610.c | 7 +------ 4 files changed, 4 insertions(+), 26 deletions(-)
Signature · 1 line
2.8.4
PATCH 2/4 gpio: mxc: drop unused MODULE_ tags from non-modular code
The Kconfig currently controlling compilation of this code is:
drivers/gpio/Kconfig:config GPIO_MXCdrivers/gpio/Kconfig: def_bool y
...meaning that it currently is not being built as a module by anyone.
Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only.
We delete the MODULE_LICENSE tag etc. since all that information was (or is now) contained at the top of the file in the comments. Note the original e-mail had a missing/typo'd @ symbol anyway.
We don't replace module.h with init.h since the file already has that.
--- drivers/gpio/gpio-mxc.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)
drivers/gpio/gpio-mxc.c +2 -8
@@ -2,7 +2,8 @@* MXC GPIO support. (c) 2008 Daniel Mack <[email protected]> * Copyright 2008 Juergen Beisert, [email protected] * -* Based on code from Freescale, +* Based on code from Freescale Semiconductor, +* Authors: Daniel Mack, Juergen Beisert. * Copyright (C) 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or
@@ -33,7 +34,6 @@#include <linux/gpio.h> #include <linux/of.h> #include <linux/of_device.h> -#include <linux/module.h> #include <linux/bug.h> enum mxc_gpio_hwtype {
@@ -511,9 +511,3 @@ static int __init gpio_mxc_init(void)return platform_driver_register (&mxc_gpio_driver); }postcore_initcall (gpio_mxc_init); - -MODULE_AUTHOR ("Freescale Semiconductor, " -"Daniel Mack <danielncaiaq.de>, " -"Juergen Beisert <[email protected]>" ); -MODULE_DESCRIPTION ("Freescale MXC GPIO" ); -MODULE_LICENSE ("GPL" );
Signature · 1 line
2.8.4
PATCH 3/4 gpio: spear-spics: drop unused MODULE_ tags from non-modular code
In reply to Paul GortmakerThe Kconfig currently controlling compilation of this code is:
drivers/gpio/Kconfig:config GPIO_SPEAR_SPICSdrivers/gpio/Kconfig: bool "ST SPEAr13xx SPI Chip Select as GPIO support"
...meaning that it currently is not being built as a module by anyone.
Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only.
We delete the MODULE_LICENSE tag etc. since all that information is now contained at the top of the file in the comments.
Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.
--- drivers/gpio/gpio-spear-spics.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/gpio/gpio-spear-spics.c +1 -6
@@ -12,7 +12,7 @@#include <linux/err.h> #include <linux/gpio.h> #include <linux/io.h> -#include <linux/module.h> +#include <linux/init.h> #include <linux/of.h> #include <linux/platform_device.h> #include <linux/types.h>
@@ -183,7 +183,6 @@ static const struct of_device_id spics_gpio_of_match[] = { { .compatible = "st,spear-spics-gpio" }, {} }; -MODULE_DEVICE_TABLE (of, spics_gpio_of_match);static struct platform_driver spics_gpio_driver = { .probe = spics_gpio_probe,
@@ -198,7 +197,3 @@ static int __init spics_gpio_init(void)return platform_driver_register (&spics_gpio_driver); }subsys_initcall (spics_gpio_init); - -MODULE_AUTHOR ("Shiraz Hashim <[email protected]>" ); -MODULE_DESCRIPTION ("STMicroelectronics SPEAr SPI Chip Select Abstraction" ); -MODULE_LICENSE ("GPL" );
Signature · 1 line
2.8.4
PATCH 4/4 gpio: vf610: drop unused MODULE_ tags from non-modular code
In reply to Paul GortmakerThe Kconfig currently controlling compilation of this code is:
drivers/gpio/Kconfig:config GPIO_VF610drivers/gpio/Kconfig: def_bool y
...meaning that it currently is not being built as a module by anyone.
Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only.
We delete the MODULE_LICENSE tag etc. since all that information is now contained at the top of the file in the comments.
We don't replace module.h with init.h since the file already has that.
--- drivers/gpio/gpio-vf610.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/gpio/gpio-vf610.c +1 -6
@@ -1,5 +1,5 @@/* -* vf610 GPIO support through PORT and GPIO module +* Freescale vf610 GPIO support through PORT and GPIO * * Copyright (c) 2014 Toradex AG. *
@@ -23,7 +23,6 @@#include <linux/io.h> #include <linux/ioport.h> #include <linux/irq.h> -#include <linux/module.h> #include <linux/platform_device.h> #include <linux/of.h> #include <linux/of_device.h>
@@ -289,7 +288,3 @@ static int __init gpio_vf610_init(void)return platform_driver_register (&vf610_gpio_driver); }device_initcall (gpio_vf610_init); - -MODULE_AUTHOR ("Stefan Agner <[email protected]>" ); -MODULE_DESCRIPTION ("Freescale VF610 GPIO" ); -MODULE_LICENSE ("GPL v2" );
Signature · 1 line
2.8.4
PATCH 1/4 gpio: msic: drop unused MODULE_ tags from non-modular code
In reply to Paul GortmakerThe Kconfig currently controlling compilation of this code is:
drivers/gpio/Kconfig:config GPIO_MSICdrivers/gpio/Kconfig: bool "Intel MSIC mixed signal gpio support"
...meaning that it currently is not being built as a module by anyone.
Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only.
We delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments.
We don't replace module.h with init.h since the file already has that.
--- drivers/gpio/gpio-msic.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/gpio/gpio-msic.c +0 -6
@@ -20,7 +20,6 @@* */ -#include <linux/module.h> #include <linux/kernel.h> #include <linux/slab.h> #include <linux/interrupt.h>
@@ -328,9 +327,4 @@ static int __init platform_msic_gpio_init(void) {return platform_driver_register (&platform_msic_gpio_driver); } -subsys_initcall (platform_msic_gpio_init); - -MODULE_AUTHOR ("Mathias Nyman <[email protected]>" ); -MODULE_DESCRIPTION ("Intel Medfield MSIC GPIO driver" ); -MODULE_LICENSE ("GPL v2" );
Signature · 1 line
2.8.4
Re: [PATCH 1/4] gpio: msic: drop unused MODULE_ tags from non-modular code
Quoted 13 lines · Paul Gortmaker
The
Kconfigcurrently controlling compilation of this code is:drivers/gpio/Kconfig:config
GPIO_MSICdrivers/gpio/Kconfig: bool "Intel MSIC mixed signal gpio support"...meaning that it currently is not being built as a module by anyone.
Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only.
We delete the
MODULE_LICENSEtag etc. since all that information is already contained at the top of the file in the comments.
Quoted 7 lines
We don't replace
module.hwithinit.hsince the file already has that.Cc Linus Walleij <[email protected]>Cc Alexandre Courbot <[email protected]>Cc Mathias Nyman <[email protected]>Signed-off-by Paul Gortmaker <[email protected]>
Patch applied.
Yours,
Linus Walleij
Re: [PATCH 2/4] gpio: mxc: drop unused MODULE_ tags from non-modular code
In reply to Paul GortmakerQuoted 14 lines · Paul Gortmaker
The
Kconfigcurrently controlling compilation of this code is:drivers/gpio/Kconfig:config
GPIO_MXCdrivers/gpio/Kconfig:def_booly...meaning that it currently is not being built as a module by anyone.
Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only.
We delete the
MODULE_LICENSEtag etc. since all that information was (or is now) contained at the top of the file in the comments. Note the original e-mail had a missing/typo'd @ symbol anyway.
Quoted 8 lines
We don't replace
module.hwithinit.hsince the file already has that.Cc Linus Walleij <[email protected]>Cc Alexandre Courbot <[email protected]>Cc Daniel Mack <[email protected]>Cc Juergen Beisert <[email protected]>Signed-off-by Paul Gortmaker <[email protected]>
Patch applied.
Yours,
Linus Walleij
Re: [PATCH 3/4] gpio: spear-spics: drop unused MODULE_ tags from non-modular code
In reply to Paul GortmakerQuoted 13 lines · Paul Gortmaker
The
Kconfigcurrently controlling compilation of this code is:drivers/gpio/Kconfig:config
GPIO_SPEAR_SPICSdrivers/gpio/Kconfig: bool "ST SPEAr13xx SPI Chip Select as GPIO support"...meaning that it currently is not being built as a module by anyone.
Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only.
We delete the
MODULE_LICENSEtag etc. since all that information is now contained at the top of the file in the comments.
Quoted 7 lines
Also note that
MODULE_DEVICE_TABLEis a no-op for non-modular code.Cc Linus Walleij <[email protected]>Cc Alexandre Courbot <[email protected]>Cc Shiraz Hashim <[email protected]>Signed-off-by Paul Gortmaker <[email protected]>
Patch applied.
Yours,
Linus Walleij
Re: [PATCH 4/4] gpio: vf610: drop unused MODULE_ tags from non-modular code
In reply to Paul GortmakerQuoted 13 lines · Paul Gortmaker
The
Kconfigcurrently controlling compilation of this code is:drivers/gpio/Kconfig:config
GPIO_VF610drivers/gpio/Kconfig:def_booly...meaning that it currently is not being built as a module by anyone.
Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only.
We delete the
MODULE_LICENSEtag etc. since all that information is now contained at the top of the file in the comments.
Quoted 7 lines
We don't replace
module.hwithinit.hsince the file already has that.Cc Linus Walleij <[email protected]>Cc Alexandre Courbot <[email protected]>Cc Stefan Agner <[email protected]>Signed-off-by Paul Gortmaker <[email protected]>
Patch applied.
Yours,
Linus Walleij
Re: [PATCH 3/4] gpio: spear-spics: drop unused MODULE_ tags from non-modular code
In reply to Paul Gortmaker2016-08-23 1:48 GMT+09:00 Paul Gortmaker <[email protected]>:
Quoted 29 lines
The
Kconfigcurrently controlling compilation of this code is:drivers/gpio/Kconfig:config
GPIO_SPEAR_SPICSdrivers/gpio/Kconfig: bool "ST SPEAr13xx SPI Chip Select as GPIO support"...meaning that it currently is not being built as a module by anyone.
Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only.
We delete the
MODULE_LICENSEtag etc. since all that information is now contained at the top of the file in the comments.Also note that
MODULE_DEVICE_TABLEis a no-op for non-modular code.Cc Linus Walleij <[email protected]>Cc Alexandre Courbot <[email protected]>Cc Shiraz Hashim <[email protected]>Signed-off-by Paul Gortmaker <[email protected]>--- drivers/gpio/gpio-spear-spics.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)drivers/gpio/gpio-spear-spics.c +0
-0
drivers/gpio/gpio-spear-spics.c line 18
Quoted 8 lines
drivers/gpio/gpio-spear-spics.c +1
-1@@ -12,7 +12,7 @@#include <linux/err.h> #include <linux/gpio.h> #include <linux/io.h> -#include <linux/module.h> +#include <linux/init.h> #include <linux/of.h> #include <linux/platform_device.h> #include <linux/types.h>
Please keep the includes sorted alphabetically,
i.e. <linux/init.h> above <linux/io.h>.
I was a little late, though.
Signature · 2 lines
Best Regards Masahiro Yamada