linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: mark clk_disable_unused() as __init
@ 2019-10-04  9:48 Rasmus Villemoes
  2019-10-07 12:02 ` Geert Uytterhoeven
  2019-11-19 22:21 ` Stephen Boyd
  0 siblings, 2 replies; 5+ messages in thread
From: Rasmus Villemoes @ 2019-10-04  9:48 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd; +Cc: Rasmus Villemoes, linux-clk, linux-kernel

clk_disable_unused is only called once, as a late_initcall, so reclaim
a bit of memory by marking it (and the functions and data it is the
sole user of) as __init/__initdata. This moves ~1900 bytes from .text
to .init.text for a imx_v6_v7_defconfig.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
 drivers/clk/clk.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 1c677d7f7f53..a81985285a3d 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -1187,7 +1187,7 @@ static void clk_core_disable_unprepare(struct clk_core *core)
 	clk_core_unprepare_lock(core);
 }
 
-static void clk_unprepare_unused_subtree(struct clk_core *core)
+static void __init clk_unprepare_unused_subtree(struct clk_core *core)
 {
 	struct clk_core *child;
 
@@ -1217,7 +1217,7 @@ static void clk_unprepare_unused_subtree(struct clk_core *core)
 	clk_pm_runtime_put(core);
 }
 
-static void clk_disable_unused_subtree(struct clk_core *core)
+static void __init clk_disable_unused_subtree(struct clk_core *core)
 {
 	struct clk_core *child;
 	unsigned long flags;
@@ -1263,7 +1263,7 @@ static void clk_disable_unused_subtree(struct clk_core *core)
 		clk_core_disable_unprepare(core->parent);
 }
 
-static bool clk_ignore_unused;
+static bool clk_ignore_unused __initdata;
 static int __init clk_ignore_unused_setup(char *__unused)
 {
 	clk_ignore_unused = true;
@@ -1271,7 +1271,7 @@ static int __init clk_ignore_unused_setup(char *__unused)
 }
 __setup("clk_ignore_unused", clk_ignore_unused_setup);
 
-static int clk_disable_unused(void)
+static int __init clk_disable_unused(void)
 {
 	struct clk_core *core;
 
-- 
2.20.1


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

* Re: [PATCH] clk: mark clk_disable_unused() as __init
  2019-10-04  9:48 [PATCH] clk: mark clk_disable_unused() as __init Rasmus Villemoes
@ 2019-10-07 12:02 ` Geert Uytterhoeven
  2019-10-29 22:20   ` Rasmus Villemoes
  2019-11-19 22:21 ` Stephen Boyd
  1 sibling, 1 reply; 5+ messages in thread
From: Geert Uytterhoeven @ 2019-10-07 12:02 UTC (permalink / raw)
  To: Rasmus Villemoes
  Cc: Michael Turquette, Stephen Boyd, linux-clk, Linux Kernel Mailing List

On Fri, Oct 4, 2019 at 12:30 PM Rasmus Villemoes
<linux@rasmusvillemoes.dk> wrote:
> clk_disable_unused is only called once, as a late_initcall, so reclaim
> a bit of memory by marking it (and the functions and data it is the
> sole user of) as __init/__initdata. This moves ~1900 bytes from .text
> to .init.text for a imx_v6_v7_defconfig.
>
> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH] clk: mark clk_disable_unused() as __init
  2019-10-07 12:02 ` Geert Uytterhoeven
@ 2019-10-29 22:20   ` Rasmus Villemoes
  2019-10-30 14:24     ` Stephen Boyd
  0 siblings, 1 reply; 5+ messages in thread
From: Rasmus Villemoes @ 2019-10-29 22:20 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Michael Turquette, Stephen Boyd, linux-clk, Linux Kernel Mailing List

On 07/10/2019 14.02, Geert Uytterhoeven wrote:
> On Fri, Oct 4, 2019 at 12:30 PM Rasmus Villemoes
> <linux@rasmusvillemoes.dk> wrote:
>> clk_disable_unused is only called once, as a late_initcall, so reclaim
>> a bit of memory by marking it (and the functions and data it is the
>> sole user of) as __init/__initdata. This moves ~1900 bytes from .text
>> to .init.text for a imx_v6_v7_defconfig.
>>
>> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
> 
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Friendly ping. Will this be picked up?

Thanks,
Rasmus

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

* Re: [PATCH] clk: mark clk_disable_unused() as __init
  2019-10-29 22:20   ` Rasmus Villemoes
@ 2019-10-30 14:24     ` Stephen Boyd
  0 siblings, 0 replies; 5+ messages in thread
From: Stephen Boyd @ 2019-10-30 14:24 UTC (permalink / raw)
  To: Geert Uytterhoeven, Rasmus Villemoes
  Cc: Michael Turquette, linux-clk, Linux Kernel Mailing List

Quoting Rasmus Villemoes (2019-10-29 15:20:22)
> On 07/10/2019 14.02, Geert Uytterhoeven wrote:
> > On Fri, Oct 4, 2019 at 12:30 PM Rasmus Villemoes
> > <linux@rasmusvillemoes.dk> wrote:
> >> clk_disable_unused is only called once, as a late_initcall, so reclaim
> >> a bit of memory by marking it (and the functions and data it is the
> >> sole user of) as __init/__initdata. This moves ~1900 bytes from .text
> >> to .init.text for a imx_v6_v7_defconfig.
> >>
> >> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
> > 
> > Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> 
> Friendly ping. Will this be picked up?
> 

Friendly reply. Yes.


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

* Re: [PATCH] clk: mark clk_disable_unused() as __init
  2019-10-04  9:48 [PATCH] clk: mark clk_disable_unused() as __init Rasmus Villemoes
  2019-10-07 12:02 ` Geert Uytterhoeven
@ 2019-11-19 22:21 ` Stephen Boyd
  1 sibling, 0 replies; 5+ messages in thread
From: Stephen Boyd @ 2019-11-19 22:21 UTC (permalink / raw)
  To: Michael Turquette, Rasmus Villemoes
  Cc: Rasmus Villemoes, linux-clk, linux-kernel

Quoting Rasmus Villemoes (2019-10-04 02:48:25)
> clk_disable_unused is only called once, as a late_initcall, so reclaim
> a bit of memory by marking it (and the functions and data it is the
> sole user of) as __init/__initdata. This moves ~1900 bytes from .text
> to .init.text for a imx_v6_v7_defconfig.
> 
> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
> ---

Applied to clk-next


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

end of thread, other threads:[~2019-11-19 22:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-04  9:48 [PATCH] clk: mark clk_disable_unused() as __init Rasmus Villemoes
2019-10-07 12:02 ` Geert Uytterhoeven
2019-10-29 22:20   ` Rasmus Villemoes
2019-10-30 14:24     ` Stephen Boyd
2019-11-19 22:21 ` Stephen Boyd

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