From: Santosh Shilimkar <santosh.shilimkar@ti.com>
To: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
Cc: <mturquette@linaro.org>, <linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] clk: keystone: gate: fix clk_init_data initialization
Date: Fri, 31 Jan 2014 09:46:03 -0500 [thread overview]
Message-ID: <52EBB72B.20708@ti.com> (raw)
In-Reply-To: <1391104991-15000-1-git-send-email-ivan.khoronzhuk@ti.com>
On Thursday 30 January 2014 01:03 PM, Ivan Khoronzhuk wrote:
> The clk_init_data struct is allocated in the stack. All members of
> this struct should be initialized before using otherwise it will
> lead to unpredictable situation as it can contain garbage.
>
> Ultimately the clk->flag field contains garbage. In my case it leads
> that flag CLK_IGNORE_UNUSED is set for most of clocks. As result a
> bunch of unused clocks cannot be disabled.
>
> So initialize flags in this structure too.
>
> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
> ---
> Based on
> git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone.git
> keystone/master
>
> v1..v2:
> - updated commit description only
>
Thanks for the update.
> drivers/clk/keystone/gate.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/clk/keystone/gate.c b/drivers/clk/keystone/gate.c
> index 17a5983..86f1e36 100644
> --- a/drivers/clk/keystone/gate.c
> +++ b/drivers/clk/keystone/gate.c
> @@ -179,6 +179,7 @@ static struct clk *clk_register_psc(struct device *dev,
>
> init.name = name;
> init.ops = &clk_psc_ops;
> + init.flags = 0;
> init.parent_names = (parent_name ? &parent_name : NULL);
> init.num_parents = (parent_name ? 1 : 0);
>
>
prev parent reply other threads:[~2014-01-31 14:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-30 18:03 [PATCH v2] clk: keystone: gate: fix clk_init_data initialization Ivan Khoronzhuk
2014-01-31 14:46 ` Santosh Shilimkar [this message]
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=52EBB72B.20708@ti.com \
--to=santosh.shilimkar@ti.com \
--cc=ivan.khoronzhuk@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@linaro.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).