* [PATCH 28/73] cpuidle: don't use modular platform register in non-modular ARM drivers
[not found] <1390339396-3479-1-git-send-email-paul.gortmaker@windriver.com>
@ 2014-01-21 21:22 ` Paul Gortmaker
2014-01-21 21:23 ` [PATCH 67/73] drivers/base: delete non-required instances of include <linux/init.h> Paul Gortmaker
2014-01-21 21:23 ` [PATCH 68/73] drivers/cpufreq: delete non-required instances of <linux/init.h> Paul Gortmaker
2 siblings, 0 replies; 8+ messages in thread
From: Paul Gortmaker @ 2014-01-21 21:22 UTC (permalink / raw)
To: linux-kernel
Cc: linux-arch, linux-pm, Daniel Lezcano, Rafael J. Wysocki,
Michal Simek, Paul Gortmaker, linux-arm-kernel
These two drivers are configured with Kconfig options that are
both declared as bool. Hence it is not possible for the code
to be built as modular. However the code is currently using the
module_platform_driver() macro for driver registration.
While this currently works, we really don't want to be including
the module.h header in non-modular code, which we'll be forced
to do, pending some upcoming code relocation from init.h into
module.h. So we fix it now by using the non-modular equivalent.
With some macro detangulation, and a little help from cpp, we can
see that module_platform_driver(calxeda_cpuidle_plat_driver) gets
roughly translated into:
static int __init calxeda_cpuidle_plat_driver_init(void)
{
return platform_driver_register(&calxeda_cpuidle_plat_driver);
}
module_init(calxeda_cpuidle_plat_driver_init);
static void __exit calxeda_cpuidle_plat_driver_exit(void)
{
platform_driver_unregister(&calxeda_cpuidle_plat_driver);
}
module_exit(calxeda_cpuidle_plat_driver_exit);
[and similarly for the other file, cpuidle-zynq.c]
And since we've already established that the code is non-modular,
we can completely drop any code relating to module_exit. For non
modular code, module_init beomes __initcall. But direct use of
__initcall is discouraged, vs. one of the priority categorized
subgroups. As __initcall gets mapped onto device_initcall, our
use of device_initcall directly in this change means that the
runtime impact is zero -- they will remain at level 6 in the
initcall ordering.
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
drivers/cpuidle/cpuidle-calxeda.c | 6 +++++-
drivers/cpuidle/cpuidle-zynq.c | 6 +++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/cpuidle/cpuidle-calxeda.c b/drivers/cpuidle/cpuidle-calxeda.c
index 6e51114..631e2cd 100644
--- a/drivers/cpuidle/cpuidle-calxeda.c
+++ b/drivers/cpuidle/cpuidle-calxeda.c
@@ -78,4 +78,8 @@ static struct platform_driver calxeda_cpuidle_plat_driver = {
.probe = calxeda_cpuidle_probe,
};
-module_platform_driver(calxeda_cpuidle_plat_driver);
+static int __init calxeda_cpuidle_plat_driver_init(void)
+{
+ return platform_driver_register(&calxeda_cpuidle_plat_driver);
+}
+device_initcall(calxeda_cpuidle_plat_driver_init);
diff --git a/drivers/cpuidle/cpuidle-zynq.c b/drivers/cpuidle/cpuidle-zynq.c
index aded759..a1aae51 100644
--- a/drivers/cpuidle/cpuidle-zynq.c
+++ b/drivers/cpuidle/cpuidle-zynq.c
@@ -85,4 +85,8 @@ static struct platform_driver zynq_cpuidle_driver = {
.probe = zynq_cpuidle_probe,
};
-module_platform_driver(zynq_cpuidle_driver);
+static int __init zynq_cpuidle_driver_init(void)
+{
+ return platform_driver_register(&zynq_cpuidle_driver);
+}
+device_initcall(zynq_cpuidle_driver_init);
--
1.8.4.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 67/73] drivers/base: delete non-required instances of include <linux/init.h>
[not found] <1390339396-3479-1-git-send-email-paul.gortmaker@windriver.com>
2014-01-21 21:22 ` [PATCH 28/73] cpuidle: don't use modular platform register in non-modular ARM drivers Paul Gortmaker
@ 2014-01-21 21:23 ` Paul Gortmaker
2014-01-21 21:33 ` Mark Brown
` (2 more replies)
2014-01-21 21:23 ` [PATCH 68/73] drivers/cpufreq: delete non-required instances of <linux/init.h> Paul Gortmaker
2 siblings, 3 replies; 8+ messages in thread
From: Paul Gortmaker @ 2014-01-21 21:23 UTC (permalink / raw)
To: linux-kernel
Cc: linux-arch, Paul Gortmaker, Greg Kroah-Hartman, Pavel Machek,
Rafael J. Wysocki, Len Brown, Mark Brown, linux-pm
None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>. Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Len Brown <len.brown@intel.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: linux-pm@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
drivers/base/attribute_container.c | 1 -
drivers/base/power/clock_ops.c | 1 -
drivers/base/power/common.c | 1 -
drivers/base/power/domain.c | 1 -
drivers/base/power/domain_governor.c | 1 -
drivers/base/power/opp.c | 1 -
drivers/base/regmap/regmap-i2c.c | 1 -
drivers/base/regmap/regmap-mmio.c | 1 -
drivers/base/regmap/regmap-spi.c | 1 -
drivers/base/topology.c | 1 -
10 files changed, 10 deletions(-)
diff --git a/drivers/base/attribute_container.c b/drivers/base/attribute_container.c
index ecc1929..b84ca8f 100644
--- a/drivers/base/attribute_container.c
+++ b/drivers/base/attribute_container.c
@@ -12,7 +12,6 @@
*/
#include <linux/attribute_container.h>
-#include <linux/init.h>
#include <linux/device.h>
#include <linux/kernel.h>
#include <linux/slab.h>
diff --git a/drivers/base/power/clock_ops.c b/drivers/base/power/clock_ops.c
index e870bbe..b99e6c0 100644
--- a/drivers/base/power/clock_ops.c
+++ b/drivers/base/power/clock_ops.c
@@ -6,7 +6,6 @@
* This file is released under the GPLv2.
*/
-#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/device.h>
#include <linux/io.h>
diff --git a/drivers/base/power/common.c b/drivers/base/power/common.c
index 5da9140..df2e5ee 100644
--- a/drivers/base/power/common.c
+++ b/drivers/base/power/common.c
@@ -6,7 +6,6 @@
* This file is released under the GPLv2.
*/
-#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/device.h>
#include <linux/export.h>
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index bfb8955..921b192 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -6,7 +6,6 @@
* This file is released under the GPLv2.
*/
-#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/io.h>
#include <linux/pm_runtime.h>
diff --git a/drivers/base/power/domain_governor.c b/drivers/base/power/domain_governor.c
index 28dee30..a089e3b 100644
--- a/drivers/base/power/domain_governor.c
+++ b/drivers/base/power/domain_governor.c
@@ -6,7 +6,6 @@
* This file is released under the GPLv2.
*/
-#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/pm_domain.h>
#include <linux/pm_qos.h>
diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c
index fa41874..2553867 100644
--- a/drivers/base/power/opp.c
+++ b/drivers/base/power/opp.c
@@ -14,7 +14,6 @@
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/err.h>
-#include <linux/init.h>
#include <linux/slab.h>
#include <linux/cpufreq.h>
#include <linux/device.h>
diff --git a/drivers/base/regmap/regmap-i2c.c b/drivers/base/regmap/regmap-i2c.c
index fa6bf52..ebd1895 100644
--- a/drivers/base/regmap/regmap-i2c.c
+++ b/drivers/base/regmap/regmap-i2c.c
@@ -13,7 +13,6 @@
#include <linux/regmap.h>
#include <linux/i2c.h>
#include <linux/module.h>
-#include <linux/init.h>
static int regmap_i2c_write(void *context, const void *data, size_t count)
{
diff --git a/drivers/base/regmap/regmap-mmio.c b/drivers/base/regmap/regmap-mmio.c
index 81f9775..4410cb2 100644
--- a/drivers/base/regmap/regmap-mmio.c
+++ b/drivers/base/regmap/regmap-mmio.c
@@ -18,7 +18,6 @@
#include <linux/clk.h>
#include <linux/err.h>
-#include <linux/init.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/regmap.h>
diff --git a/drivers/base/regmap/regmap-spi.c b/drivers/base/regmap/regmap-spi.c
index 37f12ae..0eb3097 100644
--- a/drivers/base/regmap/regmap-spi.c
+++ b/drivers/base/regmap/regmap-spi.c
@@ -12,7 +12,6 @@
#include <linux/regmap.h>
#include <linux/spi/spi.h>
-#include <linux/init.h>
#include <linux/module.h>
#include "internal.h"
diff --git a/drivers/base/topology.c b/drivers/base/topology.c
index 94ffee3..ad9d177 100644
--- a/drivers/base/topology.c
+++ b/drivers/base/topology.c
@@ -23,7 +23,6 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
-#include <linux/init.h>
#include <linux/mm.h>
#include <linux/cpu.h>
#include <linux/module.h>
--
1.8.4.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 68/73] drivers/cpufreq: delete non-required instances of <linux/init.h>
[not found] <1390339396-3479-1-git-send-email-paul.gortmaker@windriver.com>
2014-01-21 21:22 ` [PATCH 28/73] cpuidle: don't use modular platform register in non-modular ARM drivers Paul Gortmaker
2014-01-21 21:23 ` [PATCH 67/73] drivers/base: delete non-required instances of include <linux/init.h> Paul Gortmaker
@ 2014-01-21 21:23 ` Paul Gortmaker
2014-01-22 4:58 ` Viresh Kumar
2 siblings, 1 reply; 8+ messages in thread
From: Paul Gortmaker @ 2014-01-21 21:23 UTC (permalink / raw)
To: linux-kernel
Cc: linux-arch, Paul Gortmaker, Kevin Hilman, Rafael J. Wysocki,
Viresh Kumar, cpufreq, linux-pm
None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>. Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: cpufreq@vger.kernel.org
Cc: linux-pm@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
drivers/cpufreq/omap-cpufreq.c | 1 -
drivers/cpufreq/powernow-k8.c | 1 -
drivers/cpufreq/s3c2412-cpufreq.c | 1 -
drivers/cpufreq/s3c2440-cpufreq.c | 1 -
drivers/cpufreq/spear-cpufreq.c | 1 -
drivers/cpufreq/speedstep-lib.c | 1 -
6 files changed, 6 deletions(-)
diff --git a/drivers/cpufreq/omap-cpufreq.c b/drivers/cpufreq/omap-cpufreq.c
index 590f5b6..6febc15 100644
--- a/drivers/cpufreq/omap-cpufreq.c
+++ b/drivers/cpufreq/omap-cpufreq.c
@@ -18,7 +18,6 @@
#include <linux/sched.h>
#include <linux/cpufreq.h>
#include <linux/delay.h>
-#include <linux/init.h>
#include <linux/err.h>
#include <linux/clk.h>
#include <linux/io.h>
diff --git a/drivers/cpufreq/powernow-k8.c b/drivers/cpufreq/powernow-k8.c
index e10b646..386c4ad 100644
--- a/drivers/cpufreq/powernow-k8.c
+++ b/drivers/cpufreq/powernow-k8.c
@@ -30,7 +30,6 @@
#include <linux/kernel.h>
#include <linux/smp.h>
#include <linux/module.h>
-#include <linux/init.h>
#include <linux/cpufreq.h>
#include <linux/slab.h>
#include <linux/string.h>
diff --git a/drivers/cpufreq/s3c2412-cpufreq.c b/drivers/cpufreq/s3c2412-cpufreq.c
index 4645b48..8f42bac 100644
--- a/drivers/cpufreq/s3c2412-cpufreq.c
+++ b/drivers/cpufreq/s3c2412-cpufreq.c
@@ -10,7 +10,6 @@
* published by the Free Software Foundation.
*/
-#include <linux/init.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/ioport.h>
diff --git a/drivers/cpufreq/s3c2440-cpufreq.c b/drivers/cpufreq/s3c2440-cpufreq.c
index f84ed10..1aade6d 100644
--- a/drivers/cpufreq/s3c2440-cpufreq.c
+++ b/drivers/cpufreq/s3c2440-cpufreq.c
@@ -11,7 +11,6 @@
* published by the Free Software Foundation.
*/
-#include <linux/init.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/ioport.h>
diff --git a/drivers/cpufreq/spear-cpufreq.c b/drivers/cpufreq/spear-cpufreq.c
index 5c86e3f..f481597 100644
--- a/drivers/cpufreq/spear-cpufreq.c
+++ b/drivers/cpufreq/spear-cpufreq.c
@@ -16,7 +16,6 @@
#include <linux/clk.h>
#include <linux/cpufreq.h>
#include <linux/err.h>
-#include <linux/init.h>
#include <linux/module.h>
#include <linux/of_device.h>
#include <linux/slab.h>
diff --git a/drivers/cpufreq/speedstep-lib.c b/drivers/cpufreq/speedstep-lib.c
index 7047821..1ef6fb6 100644
--- a/drivers/cpufreq/speedstep-lib.c
+++ b/drivers/cpufreq/speedstep-lib.c
@@ -11,7 +11,6 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
-#include <linux/init.h>
#include <linux/cpufreq.h>
#include <asm/msr.h>
--
1.8.4.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 67/73] drivers/base: delete non-required instances of include <linux/init.h>
2014-01-21 21:23 ` [PATCH 67/73] drivers/base: delete non-required instances of include <linux/init.h> Paul Gortmaker
@ 2014-01-21 21:33 ` Mark Brown
2014-01-21 21:42 ` Pavel Machek
2014-01-21 23:18 ` Rafael J. Wysocki
2 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2014-01-21 21:33 UTC (permalink / raw)
To: Paul Gortmaker
Cc: linux-kernel, linux-arch, Greg Kroah-Hartman, Pavel Machek,
Rafael J. Wysocki, Len Brown, linux-pm
[-- Attachment #1: Type: text/plain, Size: 360 bytes --]
On Tue, Jan 21, 2014 at 04:23:10PM -0500, Paul Gortmaker wrote:
> None of these files are actually using any __init type directives
> and hence don't need to include <linux/init.h>. Most are just a
> left over from __devinit and __cpuinit removal, or simply due to
> code getting copied from one driver to the next.
Acked-by: Mark Brown <broonie@linaro.org>
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 67/73] drivers/base: delete non-required instances of include <linux/init.h>
2014-01-21 21:23 ` [PATCH 67/73] drivers/base: delete non-required instances of include <linux/init.h> Paul Gortmaker
2014-01-21 21:33 ` Mark Brown
@ 2014-01-21 21:42 ` Pavel Machek
2014-01-21 23:18 ` Rafael J. Wysocki
2 siblings, 0 replies; 8+ messages in thread
From: Pavel Machek @ 2014-01-21 21:42 UTC (permalink / raw)
To: Paul Gortmaker
Cc: linux-kernel, linux-arch, Greg Kroah-Hartman, Rafael J. Wysocki,
Len Brown, Mark Brown, linux-pm
Hi!
> None of these files are actually using any __init type directives
> and hence don't need to include <linux/init.h>. Most are just a
> left over from __devinit and __cpuinit removal, or simply due to
> code getting copied from one driver to the next.
>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Looks good to me.
Acked-by: Pavel Machek <pavel@ucw.cz>
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 67/73] drivers/base: delete non-required instances of include <linux/init.h>
2014-01-21 21:23 ` [PATCH 67/73] drivers/base: delete non-required instances of include <linux/init.h> Paul Gortmaker
2014-01-21 21:33 ` Mark Brown
2014-01-21 21:42 ` Pavel Machek
@ 2014-01-21 23:18 ` Rafael J. Wysocki
2 siblings, 0 replies; 8+ messages in thread
From: Rafael J. Wysocki @ 2014-01-21 23:18 UTC (permalink / raw)
To: Paul Gortmaker
Cc: linux-kernel, linux-arch, Greg Kroah-Hartman, Pavel Machek,
Len Brown, Mark Brown, linux-pm
On Tuesday, January 21, 2014 04:23:10 PM Paul Gortmaker wrote:
> None of these files are actually using any __init type directives
> and hence don't need to include <linux/init.h>. Most are just a
> left over from __devinit and __cpuinit removal, or simply due to
> code getting copied from one driver to the next.
>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Pavel Machek <pavel@ucw.cz>
> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> Cc: Len Brown <len.brown@intel.com>
> Cc: Mark Brown <broonie@kernel.org>
> Cc: linux-pm@vger.kernel.org
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
> drivers/base/attribute_container.c | 1 -
> drivers/base/power/clock_ops.c | 1 -
> drivers/base/power/common.c | 1 -
> drivers/base/power/domain.c | 1 -
> drivers/base/power/domain_governor.c | 1 -
> drivers/base/power/opp.c | 1 -
> drivers/base/regmap/regmap-i2c.c | 1 -
> drivers/base/regmap/regmap-mmio.c | 1 -
> drivers/base/regmap/regmap-spi.c | 1 -
> drivers/base/topology.c | 1 -
> 10 files changed, 10 deletions(-)
>
> diff --git a/drivers/base/attribute_container.c b/drivers/base/attribute_container.c
> index ecc1929..b84ca8f 100644
> --- a/drivers/base/attribute_container.c
> +++ b/drivers/base/attribute_container.c
> @@ -12,7 +12,6 @@
> */
>
> #include <linux/attribute_container.h>
> -#include <linux/init.h>
> #include <linux/device.h>
> #include <linux/kernel.h>
> #include <linux/slab.h>
> diff --git a/drivers/base/power/clock_ops.c b/drivers/base/power/clock_ops.c
> index e870bbe..b99e6c0 100644
> --- a/drivers/base/power/clock_ops.c
> +++ b/drivers/base/power/clock_ops.c
> @@ -6,7 +6,6 @@
> * This file is released under the GPLv2.
> */
>
> -#include <linux/init.h>
> #include <linux/kernel.h>
> #include <linux/device.h>
> #include <linux/io.h>
> diff --git a/drivers/base/power/common.c b/drivers/base/power/common.c
> index 5da9140..df2e5ee 100644
> --- a/drivers/base/power/common.c
> +++ b/drivers/base/power/common.c
> @@ -6,7 +6,6 @@
> * This file is released under the GPLv2.
> */
>
> -#include <linux/init.h>
> #include <linux/kernel.h>
> #include <linux/device.h>
> #include <linux/export.h>
> diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
> index bfb8955..921b192 100644
> --- a/drivers/base/power/domain.c
> +++ b/drivers/base/power/domain.c
> @@ -6,7 +6,6 @@
> * This file is released under the GPLv2.
> */
>
> -#include <linux/init.h>
> #include <linux/kernel.h>
> #include <linux/io.h>
> #include <linux/pm_runtime.h>
> diff --git a/drivers/base/power/domain_governor.c b/drivers/base/power/domain_governor.c
> index 28dee30..a089e3b 100644
> --- a/drivers/base/power/domain_governor.c
> +++ b/drivers/base/power/domain_governor.c
> @@ -6,7 +6,6 @@
> * This file is released under the GPLv2.
> */
>
> -#include <linux/init.h>
> #include <linux/kernel.h>
> #include <linux/pm_domain.h>
> #include <linux/pm_qos.h>
> diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c
> index fa41874..2553867 100644
> --- a/drivers/base/power/opp.c
> +++ b/drivers/base/power/opp.c
> @@ -14,7 +14,6 @@
> #include <linux/kernel.h>
> #include <linux/errno.h>
> #include <linux/err.h>
> -#include <linux/init.h>
> #include <linux/slab.h>
> #include <linux/cpufreq.h>
> #include <linux/device.h>
> diff --git a/drivers/base/regmap/regmap-i2c.c b/drivers/base/regmap/regmap-i2c.c
> index fa6bf52..ebd1895 100644
> --- a/drivers/base/regmap/regmap-i2c.c
> +++ b/drivers/base/regmap/regmap-i2c.c
> @@ -13,7 +13,6 @@
> #include <linux/regmap.h>
> #include <linux/i2c.h>
> #include <linux/module.h>
> -#include <linux/init.h>
>
> static int regmap_i2c_write(void *context, const void *data, size_t count)
> {
> diff --git a/drivers/base/regmap/regmap-mmio.c b/drivers/base/regmap/regmap-mmio.c
> index 81f9775..4410cb2 100644
> --- a/drivers/base/regmap/regmap-mmio.c
> +++ b/drivers/base/regmap/regmap-mmio.c
> @@ -18,7 +18,6 @@
>
> #include <linux/clk.h>
> #include <linux/err.h>
> -#include <linux/init.h>
> #include <linux/io.h>
> #include <linux/module.h>
> #include <linux/regmap.h>
> diff --git a/drivers/base/regmap/regmap-spi.c b/drivers/base/regmap/regmap-spi.c
> index 37f12ae..0eb3097 100644
> --- a/drivers/base/regmap/regmap-spi.c
> +++ b/drivers/base/regmap/regmap-spi.c
> @@ -12,7 +12,6 @@
>
> #include <linux/regmap.h>
> #include <linux/spi/spi.h>
> -#include <linux/init.h>
> #include <linux/module.h>
>
> #include "internal.h"
> diff --git a/drivers/base/topology.c b/drivers/base/topology.c
> index 94ffee3..ad9d177 100644
> --- a/drivers/base/topology.c
> +++ b/drivers/base/topology.c
> @@ -23,7 +23,6 @@
> * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
> *
> */
> -#include <linux/init.h>
> #include <linux/mm.h>
> #include <linux/cpu.h>
> #include <linux/module.h>
>
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 68/73] drivers/cpufreq: delete non-required instances of <linux/init.h>
2014-01-21 21:23 ` [PATCH 68/73] drivers/cpufreq: delete non-required instances of <linux/init.h> Paul Gortmaker
@ 2014-01-22 4:58 ` Viresh Kumar
2014-01-22 9:17 ` Paul Gortmaker
0 siblings, 1 reply; 8+ messages in thread
From: Viresh Kumar @ 2014-01-22 4:58 UTC (permalink / raw)
To: Paul Gortmaker
Cc: Linux Kernel Mailing List, linux-arch, Kevin Hilman,
Rafael J. Wysocki, cpufreq@vger.kernel.org,
linux-pm@vger.kernel.org
On 22 January 2014 02:53, Paul Gortmaker <paul.gortmaker@windriver.com> wrote:
> None of these files are actually using any __init type directives
> and hence don't need to include <linux/init.h>. Most are just a
> left over from __devinit and __cpuinit removal, or simply due to
> code getting copied from one driver to the next.
>
> Cc: Kevin Hilman <khilman@deeprootsystems.com>
> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> Cc: Viresh Kumar <viresh.kumar@linaro.org>
> Cc: cpufreq@vger.kernel.org
> Cc: linux-pm@vger.kernel.org
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> ---
> drivers/cpufreq/omap-cpufreq.c | 1 -
> drivers/cpufreq/powernow-k8.c | 1 -
> drivers/cpufreq/s3c2412-cpufreq.c | 1 -
> drivers/cpufreq/s3c2440-cpufreq.c | 1 -
> drivers/cpufreq/spear-cpufreq.c | 1 -
> drivers/cpufreq/speedstep-lib.c | 1 -
> 6 files changed, 6 deletions(-)
We have discussed this in past where I pointed out this file is required
by stuff like module_init, what happened to that query ?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 68/73] drivers/cpufreq: delete non-required instances of <linux/init.h>
2014-01-22 4:58 ` Viresh Kumar
@ 2014-01-22 9:17 ` Paul Gortmaker
0 siblings, 0 replies; 8+ messages in thread
From: Paul Gortmaker @ 2014-01-22 9:17 UTC (permalink / raw)
To: Viresh Kumar
Cc: Linux Kernel Mailing List, linux-arch, Kevin Hilman,
Rafael J. Wysocki, cpufreq@vger.kernel.org,
linux-pm@vger.kernel.org
On 1/21/14, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> On 22 January 2014 02:53, Paul Gortmaker <paul.gortmaker@windriver.com>
> wrote:
>> None of these files are actually using any __init type directives
>> and hence don't need to include <linux/init.h>. Most are just a
>> left over from __devinit and __cpuinit removal, or simply due to
>> code getting copied from one driver to the next.
>>
>> Cc: Kevin Hilman <khilman@deeprootsystems.com>
>> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
>> Cc: Viresh Kumar <viresh.kumar@linaro.org>
>> Cc: cpufreq@vger.kernel.org
>> Cc: linux-pm@vger.kernel.org
>> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
>> ---
>> drivers/cpufreq/omap-cpufreq.c | 1 -
>> drivers/cpufreq/powernow-k8.c | 1 -
>> drivers/cpufreq/s3c2412-cpufreq.c | 1 -
>> drivers/cpufreq/s3c2440-cpufreq.c | 1 -
>> drivers/cpufreq/spear-cpufreq.c | 1 -
>> drivers/cpufreq/speedstep-lib.c | 1 -
>> 6 files changed, 6 deletions(-)
>
> We have discussed this in past where I pointed out this file is required
> by stuff like module_init, what happened to that query ?
Patch 31/73 relocates module_init and similar macros to
module.h so that is no longer an implicit dependency.
https://lkml.org/lkml/2014/1/21/488
Thanks,
Paul
--
> --
> To unsubscribe from this list: send the line "unsubscribe linux-arch" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-01-22 9:17 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1390339396-3479-1-git-send-email-paul.gortmaker@windriver.com>
2014-01-21 21:22 ` [PATCH 28/73] cpuidle: don't use modular platform register in non-modular ARM drivers Paul Gortmaker
2014-01-21 21:23 ` [PATCH 67/73] drivers/base: delete non-required instances of include <linux/init.h> Paul Gortmaker
2014-01-21 21:33 ` Mark Brown
2014-01-21 21:42 ` Pavel Machek
2014-01-21 23:18 ` Rafael J. Wysocki
2014-01-21 21:23 ` [PATCH 68/73] drivers/cpufreq: delete non-required instances of <linux/init.h> Paul Gortmaker
2014-01-22 4:58 ` Viresh Kumar
2014-01-22 9:17 ` Paul Gortmaker
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).