Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1491632 > unrolled thread

[PATCH] padata: remove recently added module usage from bool code

Started byPaul Gortmaker <paul.gortmaker@windriver.com>
First post2016-09-27 03:20 +0200
Last post2016-09-27 11:10 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] padata: remove recently added module usage from bool code Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-09-27 03:20 +0200
    Re: [PATCH] padata: remove recently added module usage from bool code Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-09-27 11:10 +0200

#1491632 — [PATCH] padata: remove recently added module usage from bool code

FromPaul Gortmaker <paul.gortmaker@windriver.com>
Date2016-09-27 03:20 +0200
Subject[PATCH] padata: remove recently added module usage from bool code
Message-ID<slPdT-2Tn-9@gated-at.bofh.it>
In commit 30e92153b4e6 ("padata: Convert to hotplug state machine")
this file started using module.h and got module_init and module_exit
added to it.

However the Kconfig for it is:

   init/Kconfig:config PADATA
   init/Kconfig:   depends on SMP
   init/Kconfig:   bool

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

Cc: Steffen Klassert <steffen.klassert@secunet.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-crypto@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 kernel/padata.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/kernel/padata.c b/kernel/padata.c
index 7848f0566403..355807e52b1e 100644
--- a/kernel/padata.c
+++ b/kernel/padata.c
@@ -30,7 +30,7 @@
 #include <linux/slab.h>
 #include <linux/sysfs.h>
 #include <linux/rcupdate.h>
-#include <linux/module.h>
+#include <linux/init.h>
 
 #define MAX_OBJ_NUM 1000
 
@@ -1043,11 +1043,6 @@ static __init int padata_driver_init(void)
 	hp_online = ret;
 	return 0;
 }
-module_init(padata_driver_init);
+device_initcall(padata_driver_init);
 
-static __exit void padata_driver_exit(void)
-{
-	cpuhp_remove_multi_state(hp_online);
-}
-module_exit(padata_driver_exit);
 #endif
-- 
2.10.0

[toc] | [next] | [standalone]


#1491770

FromSebastian Andrzej Siewior <bigeasy@linutronix.de>
Date2016-09-27 11:10 +0200
Message-ID<slWyJ-7CX-3@gated-at.bofh.it>
In reply to#1491632
On 2016-09-26 21:18:21 [-0400], Paul Gortmaker wrote:
> 
> ...and so it currently is not being built as a module by anyone.

that is correct.

Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

Sebastian

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web