linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers: base: power: mark 2 functions as __init to save some memory
@ 2020-06-21  8:18 Christophe JAILLET
  2020-06-23 16:34 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2020-06-21  8:18 UTC (permalink / raw)
  To: rjw, len.brown, pavel, gregkh
  Cc: linux-pm, linux-kernel, kernel-janitors, Christophe JAILLET

'early_resume_init()' and 'late_resume_init() 'are only called respectively
via 'early_resume_init' and 'late_resume_init'.
They can be marked as __init to save a few bytes of memory.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/base/power/trace.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/base/power/trace.c b/drivers/base/power/trace.c
index 977d27bd1a22..a97f33d0c59f 100644
--- a/drivers/base/power/trace.c
+++ b/drivers/base/power/trace.c
@@ -265,14 +265,14 @@ static struct notifier_block pm_trace_nb = {
 	.notifier_call = pm_trace_notify,
 };
 
-static int early_resume_init(void)
+static int __init early_resume_init(void)
 {
 	hash_value_early_read = read_magic_time();
 	register_pm_notifier(&pm_trace_nb);
 	return 0;
 }
 
-static int late_resume_init(void)
+static int __init late_resume_init(void)
 {
 	unsigned int val = hash_value_early_read;
 	unsigned int user, file, dev;
-- 
2.25.1


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

* Re: [PATCH] drivers: base: power: mark 2 functions as __init to save some memory
  2020-06-21  8:18 [PATCH] drivers: base: power: mark 2 functions as __init to save some memory Christophe JAILLET
@ 2020-06-23 16:34 ` Rafael J. Wysocki
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2020-06-23 16:34 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: len.brown, pavel, gregkh, linux-pm, linux-kernel, kernel-janitors

On Sunday, June 21, 2020 10:18:54 AM CEST Christophe JAILLET wrote:
> 'early_resume_init()' and 'late_resume_init() 'are only called respectively
> via 'early_resume_init' and 'late_resume_init'.
> They can be marked as __init to save a few bytes of memory.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
>  drivers/base/power/trace.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/base/power/trace.c b/drivers/base/power/trace.c
> index 977d27bd1a22..a97f33d0c59f 100644
> --- a/drivers/base/power/trace.c
> +++ b/drivers/base/power/trace.c
> @@ -265,14 +265,14 @@ static struct notifier_block pm_trace_nb = {
>  	.notifier_call = pm_trace_notify,
>  };
>  
> -static int early_resume_init(void)
> +static int __init early_resume_init(void)
>  {
>  	hash_value_early_read = read_magic_time();
>  	register_pm_notifier(&pm_trace_nb);
>  	return 0;
>  }
>  
> -static int late_resume_init(void)
> +static int __init late_resume_init(void)
>  {
>  	unsigned int val = hash_value_early_read;
>  	unsigned int user, file, dev;
> 

Applied as 5.8-rc material, thanks!




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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-21  8:18 [PATCH] drivers: base: power: mark 2 functions as __init to save some memory Christophe JAILLET
2020-06-23 16:34 ` 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).