diff mbox series

clk: mark clk_disable_unused() as __init

Message ID 20191004094826.8320-1-linux@rasmusvillemoes.dk (mailing list archive)
State Accepted, archived
Headers show
Series clk: mark clk_disable_unused() as __init | expand

Commit Message

Rasmus Villemoes Oct. 4, 2019, 9:48 a.m. UTC
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(-)

Comments

Geert Uytterhoeven Oct. 7, 2019, 12:02 p.m. UTC | #1
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
Rasmus Villemoes Oct. 29, 2019, 10:20 p.m. UTC | #2
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
Stephen Boyd Oct. 30, 2019, 2:24 p.m. UTC | #3
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.
Stephen Boyd Nov. 19, 2019, 10:21 p.m. UTC | #4
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
diff mbox series

Patch

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;