linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: sboyd@codeaurora.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] clk: samsung: exynos5260: Move struct samsung_cmu_info to init section
Date: Mon, 22 Aug 2016 17:55:12 -0700	[thread overview]
Message-ID: <20160823005512.GP6502@codeaurora.org> (raw)
In-Reply-To: <1471834185-20249-2-git-send-email-cw00.choi@samsung.com>

On 08/22, Chanwoo Choi wrote:
> This patch moves the all samsung_cmu_info struct to initconst section
> because they are used only in initconst section.
> 
> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
> ---
>  drivers/clk/samsung/clk-exynos5260.c | 350 +++++++++++++++++------------------
>  1 file changed, 175 insertions(+), 175 deletions(-)
> 
> diff --git a/drivers/clk/samsung/clk-exynos5260.c b/drivers/clk/samsung/clk-exynos5260.c
> index a43642c36039..fd1d9bfc151b 100644
> --- a/drivers/clk/samsung/clk-exynos5260.c
> +++ b/drivers/clk/samsung/clk-exynos5260.c
> @@ -131,21 +131,21 @@ static const struct samsung_gate_clock aud_gate_clks[] __initconst = {
>  			EN_IP_AUD, 4, 0, 0),
>  };
>  
> +static const struct samsung_cmu_info aud_cmu __initconst = {
> +	.mux_clks	= aud_mux_clks,
> +	.nr_mux_clks	= ARRAY_SIZE(aud_mux_clks),
> +	.div_clks	= aud_div_clks,
> +	.nr_div_clks	= ARRAY_SIZE(aud_div_clks),
> +	.gate_clks	= aud_gate_clks,
> +	.nr_gate_clks	= ARRAY_SIZE(aud_gate_clks),
> +	.nr_clk_ids	= AUD_NR_CLK,
> +	.clk_regs	= aud_clk_regs,
> +	.nr_clk_regs	= ARRAY_SIZE(aud_clk_regs),
> +};
> +
>  static void __init exynos5260_clk_aud_init(struct device_node *np)
>  {
> -	struct samsung_cmu_info cmu = { NULL };
> -

I presume this was done this way to save some initdata space by
only allocating the array that's needed at runtime? I would
expect to see some more kernel image bloat from this change but
runtime memory usage would stay the same. Is there any real
benefit from this patch though?

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

  reply	other threads:[~2016-08-23  0:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-22  2:49 [PATCH 0/2] clk: samsung: Move struct samsung_cmu_info to init section Chanwoo Choi
2016-08-22  2:49 ` [PATCH 1/2] clk: samsung: exynos5260: " Chanwoo Choi
2016-08-23  0:55   ` Stephen Boyd [this message]
2016-08-23  2:35     ` Chanwoo Choi
2016-08-23 10:07       ` Sylwester Nawrocki
2016-08-24  4:43         ` Stephen Boyd
2016-08-24  8:38           ` Chanwoo Choi
2016-08-25  0:11             ` Stephen Boyd
2016-08-25  7:28               ` Chanwoo Choi
2016-08-25 14:43                 ` Tomasz Figa
2016-09-01 17:06   ` Sylwester Nawrocki
2016-08-22  2:49 ` [PATCH 2/2] clk: samsung: exynos5410: Use samsung_cmu_register_one() to simplify code Chanwoo Choi
2016-09-01 17:07   ` Sylwester Nawrocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160823005512.GP6502@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).