diff mbox

soc: renesas: rcar-sysc: Mark rcar_sysc_matches[] __initconst

Message ID 1513698884-26663-1-git-send-email-geert+renesas@glider.be (mailing list archive)
State New, archived
Headers show

Commit Message

Geert Uytterhoeven Dec. 19, 2017, 3:54 p.m. UTC
rcar_sysc_matches[] is used only by rcar_sysc_pd_init(), which is
__init.  Hence mark rcar_sysc_matches[] __initconst.

This frees another 1764 bytes (arm32/shmobile_defconfig) or 1000 bytes
(arm64/renesas_defconfig) of memory after kernel init.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/soc/renesas/rcar-sysc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Simon Horman Dec. 20, 2017, 8:25 a.m. UTC | #1
On Tue, Dec 19, 2017 at 04:54:44PM +0100, Geert Uytterhoeven wrote:
> rcar_sysc_matches[] is used only by rcar_sysc_pd_init(), which is
> __init.  Hence mark rcar_sysc_matches[] __initconst.
> 
> This frees another 1764 bytes (arm32/shmobile_defconfig) or 1000 bytes
> (arm64/renesas_defconfig) of memory after kernel init.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Reviewed-by: Simon Horman <simon.horman@netronome.com>
Geert Uytterhoeven Jan. 2, 2018, 2:50 p.m. UTC | #2
Hi Simon,

On Wed, Dec 20, 2017 at 9:25 AM, Simon Horman <horms@verge.net.au> wrote:
> On Tue, Dec 19, 2017 at 04:54:44PM +0100, Geert Uytterhoeven wrote:
>> rcar_sysc_matches[] is used only by rcar_sysc_pd_init(), which is
>> __init.  Hence mark rcar_sysc_matches[] __initconst.
>>
>> This frees another 1764 bytes (arm32/shmobile_defconfig) or 1000 bytes
>> (arm64/renesas_defconfig) of memory after kernel init.
>>
>> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
> Reviewed-by: Simon Horman <simon.horman@netronome.com>

Thank you.
Please note this is a patch intended for your soc-for-v4.16 branch ;-)

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
Simon Horman Jan. 3, 2018, 10:20 a.m. UTC | #3
On Tue, Jan 02, 2018 at 03:50:19PM +0100, Geert Uytterhoeven wrote:
> Hi Simon,
> 
> On Wed, Dec 20, 2017 at 9:25 AM, Simon Horman <horms@verge.net.au> wrote:
> > On Tue, Dec 19, 2017 at 04:54:44PM +0100, Geert Uytterhoeven wrote:

...

> Thank you.
> Please note this is a patch intended for your soc-for-v4.16 branch ;-)

Thanks, I had missed that important detail.
I have applied it to that branch.
diff mbox

Patch

diff --git a/drivers/soc/renesas/rcar-sysc.c b/drivers/soc/renesas/rcar-sysc.c
index 52c25a5e2646c839..636872bc24167bb7 100644
--- a/drivers/soc/renesas/rcar-sysc.c
+++ b/drivers/soc/renesas/rcar-sysc.c
@@ -254,7 +254,7 @@  static void __init rcar_sysc_pd_setup(struct rcar_sysc_pd *pd)
 	pm_genpd_init(genpd, gov, false);
 }
 
-static const struct of_device_id rcar_sysc_matches[] = {
+static const struct of_device_id rcar_sysc_matches[] __initconst = {
 #ifdef CONFIG_SYSC_R8A7743
 	{ .compatible = "renesas,r8a7743-sysc", .data = &r8a7743_sysc_info },
 #endif