All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] powerpc: remove unused modular code from non-modular drivers
@ 2016-03-27 22:08 ` Paul Gortmaker
  0 siblings, 0 replies; 12+ messages in thread
From: Paul Gortmaker @ 2016-03-27 22:08 UTC (permalink / raw)
  To: linux-kernel
  Cc: Paul Gortmaker, Andrzej Hajda, Anton Blanchard, Arnd Bergmann,
	Benjamin Herrenschmidt, Christian Krafft, Hari Bathini,
	Michael Ellerman, Nathan Fontenot, Paul Mackerras,
	Rafael J. Wysocki, Viresh Kumar, linux-pm, linuxppc-dev

My ongoing audit looking for non-modular code that needlessly uses
modular macros (vs. built-in equivalents) and/or has dead code
relating to module unloading that can never be executed led to the
creation of these three powerpc related commits.

One is of the trivial kind, where we substitute in the non-modular
versions that CPP would have put in place anyway, resulting in no
actual changes, even at the binary output level.

The other two are almost as trivial.  In addition to the above, we
toss out the __exit function registered by module_exit, since that
will never get called for non modular code/drivers.

For anyone new to the underlying goal of this cleanup, we are trying to
not use module support for code that can never be built as a module since:

 (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.

Build tested on v4.6-rc1 to ensure no silly typos that would break
compilation crept in.

---
Cc: Andrzej Hajda <a.hajda@samsung.com>
Cc: Anton Blanchard <anton@samba.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Christian Krafft <krafft@de.ibm.com>
Cc: Hari Bathini <hbathini@linux.vnet.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: linux-pm@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org

Paul Gortmaker (3):
  powerpc: make cell/spu_base.c explicitly non-modular
  powerpc: make kernel/nvram_64.c explicitly non-modular
  drivers/cpufreq: make ppc_cbe_cpufreq_pmi driver explicitly
    non-modular

 arch/powerpc/kernel/nvram_64.c         | 12 +-----------
 arch/powerpc/platforms/cell/spu_base.c |  7 ++-----
 drivers/cpufreq/ppc_cbe_cpufreq_pmi.c  | 15 ++-------------
 3 files changed, 5 insertions(+), 29 deletions(-)

-- 
2.6.1

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 0/3] powerpc: remove unused modular code from non-modular drivers
@ 2016-03-27 22:08 ` Paul Gortmaker
  0 siblings, 0 replies; 12+ messages in thread
From: Paul Gortmaker @ 2016-03-27 22:08 UTC (permalink / raw)
  To: linux-kernel
  Cc: Paul Gortmaker, Andrzej Hajda, Anton Blanchard, Arnd Bergmann,
	Benjamin Herrenschmidt, Christian Krafft, Hari Bathini,
	Michael Ellerman, Nathan Fontenot, Paul Mackerras,
	Rafael J. Wysocki, Viresh Kumar, linux-pm, linuxppc-dev

My ongoing audit looking for non-modular code that needlessly uses
modular macros (vs. built-in equivalents) and/or has dead code
relating to module unloading that can never be executed led to the
creation of these three powerpc related commits.

One is of the trivial kind, where we substitute in the non-modular
versions that CPP would have put in place anyway, resulting in no
actual changes, even at the binary output level.

The other two are almost as trivial.  In addition to the above, we
toss out the __exit function registered by module_exit, since that
will never get called for non modular code/drivers.

For anyone new to the underlying goal of this cleanup, we are trying to
not use module support for code that can never be built as a module since:

 (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.

Build tested on v4.6-rc1 to ensure no silly typos that would break
compilation crept in.

---
Cc: Andrzej Hajda <a.hajda@samsung.com>
Cc: Anton Blanchard <anton@samba.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Christian Krafft <krafft@de.ibm.com>
Cc: Hari Bathini <hbathini@linux.vnet.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: linux-pm@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org

Paul Gortmaker (3):
  powerpc: make cell/spu_base.c explicitly non-modular
  powerpc: make kernel/nvram_64.c explicitly non-modular
  drivers/cpufreq: make ppc_cbe_cpufreq_pmi driver explicitly
    non-modular

 arch/powerpc/kernel/nvram_64.c         | 12 +-----------
 arch/powerpc/platforms/cell/spu_base.c |  7 ++-----
 drivers/cpufreq/ppc_cbe_cpufreq_pmi.c  | 15 ++-------------
 3 files changed, 5 insertions(+), 29 deletions(-)

-- 
2.6.1

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 1/3] powerpc: make cell/spu_base.c explicitly non-modular
  2016-03-27 22:08 ` Paul Gortmaker
  (?)
@ 2016-03-27 22:08 ` Paul Gortmaker
  2016-04-11 12:35   ` [1/3] " Michael Ellerman
  -1 siblings, 1 reply; 12+ messages in thread
From: Paul Gortmaker @ 2016-03-27 22:08 UTC (permalink / raw)
  To: linux-kernel
  Cc: Paul Gortmaker, Arnd Bergmann, Benjamin Herrenschmidt,
	Paul Mackerras, Michael Ellerman, linuxppc-dev

The Kconfig currently controlling compilation of this code is:

arch/powerpc/platforms/cell/Kconfig:config SPU_BASE
arch/powerpc/platforms/cell/Kconfig:    bool

...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.

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: Arnd Bergmann <arnd@arndb.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 arch/powerpc/platforms/cell/spu_base.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c
index f7af74f83693..3ede04ffdeea 100644
--- a/arch/powerpc/platforms/cell/spu_base.c
+++ b/arch/powerpc/platforms/cell/spu_base.c
@@ -24,7 +24,7 @@
 
 #include <linux/interrupt.h>
 #include <linux/list.h>
-#include <linux/module.h>
+#include <linux/init.h>
 #include <linux/ptrace.h>
 #include <linux/slab.h>
 #include <linux/wait.h>
@@ -805,7 +805,4 @@ static int __init init_spu_base(void)
  out:
 	return ret;
 }
-module_init(init_spu_base);
-
-MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Arnd Bergmann <arndb@de.ibm.com>");
+device_initcall(init_spu_base);
-- 
2.6.1

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 2/3] powerpc: make kernel/nvram_64.c explicitly non-modular
  2016-03-27 22:08 ` Paul Gortmaker
  (?)
  (?)
@ 2016-03-27 22:08 ` Paul Gortmaker
  2016-03-28 14:22   ` Nathan Fontenot
  2016-04-11 12:35   ` [2/3] " Michael Ellerman
  -1 siblings, 2 replies; 12+ messages in thread
From: Paul Gortmaker @ 2016-03-27 22:08 UTC (permalink / raw)
  To: linux-kernel
  Cc: Paul Gortmaker, Benjamin Herrenschmidt, Paul Mackerras,
	Michael Ellerman, Hari Bathini, Nathan Fontenot, Andrzej Hajda,
	Anton Blanchard, linuxppc-dev

The Makefile/Kconfig currently controlling compilation of this code is:

obj-$(CONFIG_PPC64)             += setup_64.o sys_ppc32.o \
                                   signal_64.o ptrace32.o \
                                   paca.o nvram_64.o firmware.o

arch/powerpc/platforms/Kconfig.cputype:config PPC64
arch/powerpc/platforms/Kconfig.cputype: bool "64-bit kernel"

...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.

We don't replace module.h with init.h since the file already has that.

We delete the MODULE_LICENSE tag since that information is already
contained at the top of the file in the comments.

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Hari Bathini <hbathini@linux.vnet.ibm.com>
Cc: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Cc: Andrzej Hajda <a.hajda@samsung.com>
Cc: Anton Blanchard <anton@samba.org>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 arch/powerpc/kernel/nvram_64.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/arch/powerpc/kernel/nvram_64.c b/arch/powerpc/kernel/nvram_64.c
index 0cab9e8c3794..856f9a7944cd 100644
--- a/arch/powerpc/kernel/nvram_64.c
+++ b/arch/powerpc/kernel/nvram_64.c
@@ -15,8 +15,6 @@
  *       parsing code.
  */
 
-#include <linux/module.h>
-
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/fs.h>
@@ -1231,12 +1229,4 @@ static int __init nvram_init(void)
   	
   	return rc;
 }
-
-static void __exit nvram_cleanup(void)
-{
-        misc_deregister( &nvram_dev );
-}
-
-module_init(nvram_init);
-module_exit(nvram_cleanup);
-MODULE_LICENSE("GPL");
+device_initcall(nvram_init);
-- 
2.6.1

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 3/3] drivers/cpufreq: make ppc_cbe_cpufreq_pmi driver explicitly non-modular
  2016-03-27 22:08 ` Paul Gortmaker
@ 2016-03-27 22:08   ` Paul Gortmaker
  -1 siblings, 0 replies; 12+ messages in thread
From: Paul Gortmaker @ 2016-03-27 22:08 UTC (permalink / raw)
  To: linux-kernel
  Cc: Paul Gortmaker, Rafael J. Wysocki, Viresh Kumar,
	Christian Krafft, Benjamin Herrenschmidt, Paul Mackerras,
	Michael Ellerman, linuxppc-dev, linux-pm

The Kconfig for this driver is currently:

config CPU_FREQ_CBE_PMI
    bool "CBE frequency scaling using PMI interface"

...meaning that it currently is not being built as a module by
anyone.  Lets remove the modular and unused code here, 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.

Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Christian Krafft <krafft@de.ibm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-pm@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/cpufreq/ppc_cbe_cpufreq_pmi.c | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/drivers/cpufreq/ppc_cbe_cpufreq_pmi.c b/drivers/cpufreq/ppc_cbe_cpufreq_pmi.c
index 7969f7690498..7c4cd5c634f2 100644
--- a/drivers/cpufreq/ppc_cbe_cpufreq_pmi.c
+++ b/drivers/cpufreq/ppc_cbe_cpufreq_pmi.c
@@ -23,7 +23,7 @@
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/timer.h>
-#include <linux/module.h>
+#include <linux/init.h>
 #include <linux/of_platform.h>
 
 #include <asm/processor.h>
@@ -142,15 +142,4 @@ static int __init cbe_cpufreq_pmi_init(void)
 
 	return 0;
 }
-
-static void __exit cbe_cpufreq_pmi_exit(void)
-{
-	cpufreq_unregister_notifier(&pmi_notifier_block, CPUFREQ_POLICY_NOTIFIER);
-	pmi_unregister_handler(&cbe_pmi_handler);
-}
-
-module_init(cbe_cpufreq_pmi_init);
-module_exit(cbe_cpufreq_pmi_exit);
-
-MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Christian Krafft <krafft@de.ibm.com>");
+device_initcall(cbe_cpufreq_pmi_init);
-- 
2.6.1

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 3/3] drivers/cpufreq: make ppc_cbe_cpufreq_pmi driver explicitly non-modular
@ 2016-03-27 22:08   ` Paul Gortmaker
  0 siblings, 0 replies; 12+ messages in thread
From: Paul Gortmaker @ 2016-03-27 22:08 UTC (permalink / raw)
  To: linux-kernel
  Cc: Paul Gortmaker, Rafael J. Wysocki, Viresh Kumar,
	Christian Krafft, Benjamin Herrenschmidt, Paul Mackerras,
	Michael Ellerman, linuxppc-dev, linux-pm

The Kconfig for this driver is currently:

config CPU_FREQ_CBE_PMI
    bool "CBE frequency scaling using PMI interface"

...meaning that it currently is not being built as a module by
anyone.  Lets remove the modular and unused code here, 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.

Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Christian Krafft <krafft@de.ibm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-pm@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/cpufreq/ppc_cbe_cpufreq_pmi.c | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/drivers/cpufreq/ppc_cbe_cpufreq_pmi.c b/drivers/cpufreq/ppc_cbe_cpufreq_pmi.c
index 7969f7690498..7c4cd5c634f2 100644
--- a/drivers/cpufreq/ppc_cbe_cpufreq_pmi.c
+++ b/drivers/cpufreq/ppc_cbe_cpufreq_pmi.c
@@ -23,7 +23,7 @@
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/timer.h>
-#include <linux/module.h>
+#include <linux/init.h>
 #include <linux/of_platform.h>
 
 #include <asm/processor.h>
@@ -142,15 +142,4 @@ static int __init cbe_cpufreq_pmi_init(void)
 
 	return 0;
 }
-
-static void __exit cbe_cpufreq_pmi_exit(void)
-{
-	cpufreq_unregister_notifier(&pmi_notifier_block, CPUFREQ_POLICY_NOTIFIER);
-	pmi_unregister_handler(&cbe_pmi_handler);
-}
-
-module_init(cbe_cpufreq_pmi_init);
-module_exit(cbe_cpufreq_pmi_exit);
-
-MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Christian Krafft <krafft@de.ibm.com>");
+device_initcall(cbe_cpufreq_pmi_init);
-- 
2.6.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH 3/3] drivers/cpufreq: make ppc_cbe_cpufreq_pmi driver explicitly non-modular
  2016-03-27 22:08   ` Paul Gortmaker
  (?)
@ 2016-03-28  2:33   ` Viresh Kumar
  -1 siblings, 0 replies; 12+ messages in thread
From: Viresh Kumar @ 2016-03-28  2:33 UTC (permalink / raw)
  To: Paul Gortmaker
  Cc: linux-kernel, Rafael J. Wysocki, Christian Krafft,
	Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	linuxppc-dev, linux-pm

On 27-03-16, 18:08, Paul Gortmaker wrote:
> The Kconfig for this driver is currently:
> 
> config CPU_FREQ_CBE_PMI
>     bool "CBE frequency scaling using PMI interface"
> 
> ...meaning that it currently is not being built as a module by
> anyone.  Lets remove the modular and unused code here, 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.
> 
> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> Cc: Viresh Kumar <viresh.kumar@linaro.org>
> Cc: Christian Krafft <krafft@de.ibm.com>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: linuxppc-dev@lists.ozlabs.org
> Cc: linux-pm@vger.kernel.org
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> ---
>  drivers/cpufreq/ppc_cbe_cpufreq_pmi.c | 15 ++-------------
>  1 file changed, 2 insertions(+), 13 deletions(-)

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/3] powerpc: make kernel/nvram_64.c explicitly non-modular
  2016-03-27 22:08 ` [PATCH 2/3] powerpc: make kernel/nvram_64.c " Paul Gortmaker
@ 2016-03-28 14:22   ` Nathan Fontenot
  2016-04-11 12:35   ` [2/3] " Michael Ellerman
  1 sibling, 0 replies; 12+ messages in thread
From: Nathan Fontenot @ 2016-03-28 14:22 UTC (permalink / raw)
  To: Paul Gortmaker, linux-kernel
  Cc: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	Hari Bathini, Andrzej Hajda, Anton Blanchard, linuxppc-dev

On 03/27/2016 05:08 PM, Paul Gortmaker wrote:
> The Makefile/Kconfig currently controlling compilation of this code is:
> 
> obj-$(CONFIG_PPC64)             += setup_64.o sys_ppc32.o \
>                                    signal_64.o ptrace32.o \
>                                    paca.o nvram_64.o firmware.o
> 
> arch/powerpc/platforms/Kconfig.cputype:config PPC64
> arch/powerpc/platforms/Kconfig.cputype: bool "64-bit kernel"
> 
> ...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.
> 
> We don't replace module.h with init.h since the file already has that.
> 
> We delete the MODULE_LICENSE tag since that information is already
> contained at the top of the file in the comments.
> 
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Hari Bathini <hbathini@linux.vnet.ibm.com>
> Cc: Nathan Fontenot <nfont@linux.vnet.ibm.com>
> Cc: Andrzej Hajda <a.hajda@samsung.com>
> Cc: Anton Blanchard <anton@samba.org>
> Cc: linuxppc-dev@lists.ozlabs.org
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> ---

I think at some point in the past we thought this may be useful as a module
but I'm not sure it has ever been used that way.

Reviewed-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>

>  arch/powerpc/kernel/nvram_64.c | 12 +-----------
>  1 file changed, 1 insertion(+), 11 deletions(-)
> 
> diff --git a/arch/powerpc/kernel/nvram_64.c b/arch/powerpc/kernel/nvram_64.c
> index 0cab9e8c3794..856f9a7944cd 100644
> --- a/arch/powerpc/kernel/nvram_64.c
> +++ b/arch/powerpc/kernel/nvram_64.c
> @@ -15,8 +15,6 @@
>   *       parsing code.
>   */
> 
> -#include <linux/module.h>
> -
>  #include <linux/types.h>
>  #include <linux/errno.h>
>  #include <linux/fs.h>
> @@ -1231,12 +1229,4 @@ static int __init nvram_init(void)
>    	
>    	return rc;
>  }
> -
> -static void __exit nvram_cleanup(void)
> -{
> -        misc_deregister( &nvram_dev );
> -}
> -
> -module_init(nvram_init);
> -module_exit(nvram_cleanup);
> -MODULE_LICENSE("GPL");
> +device_initcall(nvram_init);
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [1/3] powerpc: make cell/spu_base.c explicitly non-modular
  2016-03-27 22:08 ` [PATCH 1/3] powerpc: make cell/spu_base.c explicitly non-modular Paul Gortmaker
@ 2016-04-11 12:35   ` Michael Ellerman
  0 siblings, 0 replies; 12+ messages in thread
From: Michael Ellerman @ 2016-04-11 12:35 UTC (permalink / raw)
  To: Paul Gortmaker, linux-kernel
  Cc: Arnd Bergmann, Paul Gortmaker, Paul Mackerras, linuxppc-dev

On Sun, 2016-27-03 at 22:08:15 UTC, Paul Gortmaker wrote:
> The Kconfig currently controlling compilation of this code is:
> 
> arch/powerpc/platforms/cell/Kconfig:config SPU_BASE
> arch/powerpc/platforms/cell/Kconfig:    bool
> 
> ...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.
...
> 
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/8038665fb54f1e54785c63be11

cheers

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [2/3] powerpc: make kernel/nvram_64.c explicitly non-modular
  2016-03-27 22:08 ` [PATCH 2/3] powerpc: make kernel/nvram_64.c " Paul Gortmaker
  2016-03-28 14:22   ` Nathan Fontenot
@ 2016-04-11 12:35   ` Michael Ellerman
  1 sibling, 0 replies; 12+ messages in thread
From: Michael Ellerman @ 2016-04-11 12:35 UTC (permalink / raw)
  To: Paul Gortmaker, linux-kernel
  Cc: Andrzej Hajda, Paul Gortmaker, Paul Mackerras, Anton Blanchard,
	Hari Bathini, Nathan Fontenot, linuxppc-dev

On Sun, 2016-27-03 at 22:08:16 UTC, Paul Gortmaker wrote:
> The Makefile/Kconfig currently controlling compilation of this code is:
> 
> obj-$(CONFIG_PPC64)             += setup_64.o sys_ppc32.o \
>                                    signal_64.o ptrace32.o \
>                                    paca.o nvram_64.o firmware.o
> 
> arch/powerpc/platforms/Kconfig.cputype:config PPC64
> arch/powerpc/platforms/Kconfig.cputype: bool "64-bit kernel"
> 
> ...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.
...
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> Reviewed-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/c0c523897d1f83bc8484cb58d1

cheers

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [3/3] drivers/cpufreq: make ppc_cbe_cpufreq_pmi driver explicitly non-modular
  2016-03-27 22:08   ` Paul Gortmaker
@ 2016-04-11 12:35     ` Michael Ellerman
  -1 siblings, 0 replies; 12+ messages in thread
From: Michael Ellerman @ 2016-04-11 12:35 UTC (permalink / raw)
  To: Paul Gortmaker, linux-kernel
  Cc: linux-pm, Rafael J. Wysocki, Paul Gortmaker, Paul Mackerras,
	Viresh Kumar, Christian Krafft, linuxppc-dev

On Sun, 2016-27-03 at 22:08:17 UTC, Paul Gortmaker wrote:
> The Kconfig for this driver is currently:
> 
> config CPU_FREQ_CBE_PMI
>     bool "CBE frequency scaling using PMI interface"
> 
> ...meaning that it currently is not being built as a module by
> anyone.  Lets remove the modular and unused code here, so that
> when reading the driver there is no doubt it is builtin-only.
> 
...
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/6a0bcab9c6c337e14689cabd27

cheers

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [3/3] drivers/cpufreq: make ppc_cbe_cpufreq_pmi driver explicitly non-modular
@ 2016-04-11 12:35     ` Michael Ellerman
  0 siblings, 0 replies; 12+ messages in thread
From: Michael Ellerman @ 2016-04-11 12:35 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-pm, Rafael J. Wysocki, Paul Gortmaker, Paul Mackerras,
	Viresh Kumar, Christian Krafft, linuxppc-dev

On Sun, 2016-27-03 at 22:08:17 UTC, Paul Gortmaker wrote:
> The Kconfig for this driver is currently:
> 
> config CPU_FREQ_CBE_PMI
>     bool "CBE frequency scaling using PMI interface"
> 
> ...meaning that it currently is not being built as a module by
> anyone.  Lets remove the modular and unused code here, so that
> when reading the driver there is no doubt it is builtin-only.
> 
...
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/6a0bcab9c6c337e14689cabd27

cheers

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-04-11 12:35 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-27 22:08 [PATCH 0/3] powerpc: remove unused modular code from non-modular drivers Paul Gortmaker
2016-03-27 22:08 ` Paul Gortmaker
2016-03-27 22:08 ` [PATCH 1/3] powerpc: make cell/spu_base.c explicitly non-modular Paul Gortmaker
2016-04-11 12:35   ` [1/3] " Michael Ellerman
2016-03-27 22:08 ` [PATCH 2/3] powerpc: make kernel/nvram_64.c " Paul Gortmaker
2016-03-28 14:22   ` Nathan Fontenot
2016-04-11 12:35   ` [2/3] " Michael Ellerman
2016-03-27 22:08 ` [PATCH 3/3] drivers/cpufreq: make ppc_cbe_cpufreq_pmi driver " Paul Gortmaker
2016-03-27 22:08   ` Paul Gortmaker
2016-03-28  2:33   ` Viresh Kumar
2016-04-11 12:35   ` [3/3] " Michael Ellerman
2016-04-11 12:35     ` Michael Ellerman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.