linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/compaction: don't use modular references for non modular code
@ 2016-02-13 22:47 Paul Gortmaker
  2016-03-02  9:22 ` Vlastimil Babka
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Gortmaker @ 2016-02-13 22:47 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-mm, Paul Gortmaker, Vlastimil Babka, Andrew Morton

replace module_init with subsys_initcall ; which will be two
levels earlier, but mm smells like a subsystem to me.

Compile tested only.

Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---

[Feel free to squash this into the original, if desired.]

 mm/compaction.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/mm/compaction.c b/mm/compaction.c
index 4cb1c2ef5abb..4d99e1f5055c 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -20,7 +20,6 @@
 #include <linux/kasan.h>
 #include <linux/kthread.h>
 #include <linux/freezer.h>
-#include <linux/module.h>
 #include "internal.h"
 
 #ifdef CONFIG_COMPACTION
@@ -1954,7 +1953,6 @@ static int __init kcompactd_init(void)
 	hotcpu_notifier(cpu_callback, 0);
 	return 0;
 }
-
-module_init(kcompactd_init)
+subsys_initcall(kcompactd_init)
 
 #endif /* CONFIG_COMPACTION */
-- 
2.6.1

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH] mm/compaction: don't use modular references for non modular code
  2016-02-13 22:47 [PATCH] mm/compaction: don't use modular references for non modular code Paul Gortmaker
@ 2016-03-02  9:22 ` Vlastimil Babka
  0 siblings, 0 replies; 2+ messages in thread
From: Vlastimil Babka @ 2016-03-02  9:22 UTC (permalink / raw)
  To: Paul Gortmaker, linux-kernel; +Cc: linux-mm, Andrew Morton

On 02/13/2016 11:47 PM, Paul Gortmaker wrote:
> replace module_init with subsys_initcall ; which will be two
> levels earlier, but mm smells like a subsystem to me.

I admit I don't know the exact differences here, but it makes sense as 
it's not a module.
I just copied this code from kswapd, which also uses module_init(). 
Should it be also converted?

> Compile tested only.
>
> Cc: Vlastimil Babka <vbabka@suse.cz>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> ---
>
> [Feel free to squash this into the original, if desired.]
>
>   mm/compaction.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/mm/compaction.c b/mm/compaction.c
> index 4cb1c2ef5abb..4d99e1f5055c 100644
> --- a/mm/compaction.c
> +++ b/mm/compaction.c
> @@ -20,7 +20,6 @@
>   #include <linux/kasan.h>
>   #include <linux/kthread.h>
>   #include <linux/freezer.h>
> -#include <linux/module.h>
>   #include "internal.h"
>
>   #ifdef CONFIG_COMPACTION
> @@ -1954,7 +1953,6 @@ static int __init kcompactd_init(void)
>   	hotcpu_notifier(cpu_callback, 0);
>   	return 0;
>   }
> -
> -module_init(kcompactd_init)
> +subsys_initcall(kcompactd_init)
>
>   #endif /* CONFIG_COMPACTION */
>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2016-03-02  9:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-13 22:47 [PATCH] mm/compaction: don't use modular references for non modular code Paul Gortmaker
2016-03-02  9:22 ` Vlastimil Babka

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