mm/zswap: add __init to some functions in zswap
Subsystems (2)
PATCH 1/1 mm/zswap: add __init to some functions in zswap
zswap_cpu_init/zswap_comp_exit/zswap_entry_cache_create is only called by __init init_zswap()
--- mm/zswap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
mm/zswap.c +3 -3
@@ -149,7 +149,7 @@ static int __init zswap_comp_init(void)return 0 ; } -static void zswap_comp_exit (void ) +static void __init zswap_comp_exit (void ) {/* free percpu transforms */ if (zswap_comp_pcpu_tfms)
@@ -206,7 +206,7 @@ static struct zswap_tree *zswap_trees[MAX_SWAPFILES];**********************************/ static struct kmem_cache *zswap_entry_cache; -static int zswap_entry_cache_create (void ) +static int __init zswap_entry_cache_create (void ) { zswap_entry_cache =KMEM_CACHE (zswap_entry,0 );return zswap_entry_cache ==NULL ;
@@ -389,7 +389,7 @@ static struct notifier_block zswap_cpu_notifier_block = { .notifier_call = zswap_cpu_notifier }; -static int zswap_cpu_init (void ) +static int __init zswap_cpu_init (void ) {unsigned long cpu;
Signature · 7 lines
1.7.9.5 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 2 lines · Mahendran Ganesh
zswap_cpu_init/zswap_comp_exit/zswap_entry_cache_create is only called by
__initinit_zswap()
Thanks for the cleanup!
Quoted 40 lines
Signed-off-by Mahendran Ganesh <[email protected]>--- mm/zswap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)mm/zswap.c +3
-3@@ -149,7 +149,7 @@ static int __init zswap_comp_init(void)return 0 ; } -static void zswap_comp_exit (void ) +static void __init zswap_comp_exit (void ) {/* free percpu transforms */ if (zswap_comp_pcpu_tfms)@@ -206,7 +206,7 @@ static struct zswap_tree *zswap_trees[MAX_SWAPFILES];**********************************/ static struct kmem_cache *zswap_entry_cache; -static int zswap_entry_cache_create (void ) +static int __init zswap_entry_cache_create (void ) { zswap_entry_cache =KMEM_CACHE (zswap_entry,0 );return zswap_entry_cache ==NULL ;@@ -389,7 +389,7 @@ static struct notifier_block zswap_cpu_notifier_block = { .notifier_call = zswap_cpu_notifier }; -static int zswap_cpu_init (void ) +static int __init zswap_cpu_init (void ) {unsigned long cpu;Signature · 1 line
1.7.9.5
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
2014-11-13 10:55 GMT+08:00 Seth Jennings <[email protected]>:
Quoted 7 lines · Mahendran Ganesh
Quoted 2 lines
zswap_cpu_init/zswap_comp_exit/zswap_entry_cache_create is only called by
__initinit_zswap()Thanks for the cleanup!
Acked-by Seth Jennings <[email protected]>
Thanks very much!
Quoted 33 lines
Quoted 33 lines
Signed-off-by Mahendran Ganesh <[email protected]>--- mm/zswap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)mm/zswap.c +2
-2@@ -149,7 +149,7 @@ static int __init zswap_comp_init(void)return 0 ; } -static void zswap_comp_exit (void ) +static void __init zswap_comp_exit (void ) {/* free percpu transforms */ if (zswap_comp_pcpu_tfms)@@ -206,7 +206,7 @@ static struct zswap_tree *zswap_trees[MAX_SWAPFILES];**********************************/ static struct kmem_cache *zswap_entry_cache; -static int zswap_entry_cache_create (void ) +static int __init zswap_entry_cache_create (void ) { zswap_entry_cache =KMEM_CACHE (zswap_entry,0 );return zswap_entry_cache ==NULL ;@@ -389,7 +389,7 @@ static struct notifier_block zswap_cpu_notifier_block = { .notifier_call = zswap_cpu_notifier };
Quoted 8 lines
Quoted 8 lines
mm/zswap.c +1
-2-static int zswap_cpu_init (void ) +static int __init zswap_cpu_init (void ) {unsigned long cpu; --1.7.9.5
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>