linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kernel: power: swap: mark a function as __init to save some memory
@ 2020-05-31 21:00 Christophe JAILLET
  2020-05-31 22:11 ` Joe Perches
  2020-06-05 11:56 ` Rafael J. Wysocki
  0 siblings, 2 replies; 6+ messages in thread
From: Christophe JAILLET @ 2020-05-31 21:00 UTC (permalink / raw)
  To: rjw, pavel, len.brown
  Cc: linux-pm, linux-kernel, kernel-janitors, Christophe JAILLET

'swsusp_header_init()' is only called via 'core_initcall'.
It can be marked as __init to save a few bytes of memory.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 kernel/power/swap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/power/swap.c b/kernel/power/swap.c
index ca0fcb5ced71..01e2858b5fe3 100644
--- a/kernel/power/swap.c
+++ b/kernel/power/swap.c
@@ -1590,7 +1590,7 @@ int swsusp_unmark(void)
 }
 #endif
 
-static int swsusp_header_init(void)
+static int __init swsusp_header_init(void)
 {
 	swsusp_header = (struct swsusp_header*) __get_free_page(GFP_KERNEL);
 	if (!swsusp_header)
-- 
2.25.1


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

end of thread, other threads:[~2020-06-08 11:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-31 21:00 [PATCH] kernel: power: swap: mark a function as __init to save some memory Christophe JAILLET
2020-05-31 22:11 ` Joe Perches
2020-06-01 17:17   ` Christophe JAILLET
2020-06-08 11:22   ` Dan Carpenter
2020-06-08 11:34     ` Julia Lawall
2020-06-05 11:56 ` Rafael J. Wysocki

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