mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] mm/kmemleak: Make kmemleak_boot_config __init
@ 2018-01-17  3:47 Dou Liyang
  0 siblings, 0 replies; only message in thread
From: Dou Liyang @ 2018-01-17  3:47 UTC (permalink / raw)
  To: linux-kernel; +Cc: Dou Liyang, Catalin Marinas, Andrew Morton, linux-mm

The early_param() is only called during kernel initialization, So Linux
marks the functions of it with __init macro to save memory.

But it forgot to mark the kmemleak_boot_config(). So, Make it __init as
well.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org
Signed-off-by: Dou Liyang <douly.fnst@cn.fujitsu.com>
---
 mm/kmemleak.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/kmemleak.c b/mm/kmemleak.c
index f656ca27f6c2..6ccd0c954189 100644
--- a/mm/kmemleak.c
+++ b/mm/kmemleak.c
@@ -1962,7 +1962,7 @@ static void kmemleak_disable(void)
 /*
  * Allow boot-time kmemleak disabling (enabled by default).
  */
-static int kmemleak_boot_config(char *str)
+static int __init kmemleak_boot_config(char *str)
 {
 	if (!str)
 		return -EINVAL;
-- 
2.14.3

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-01-17  3:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-17  3:47 [PATCH] mm/kmemleak: Make kmemleak_boot_config __init Dou Liyang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®