From: pgaikwad@nvidia.com (Prashant Gaikwad)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] clk: Fix cached parent ptrs allocation
Date: Thu, 5 Jul 2012 22:51:17 +0530 [thread overview]
Message-ID: <4FF5CD0D.7030902@nvidia.com> (raw)
In-Reply-To: <4FF5BBD3.6080704@wwwdotorg.org>
On Thursday 05 July 2012 09:37 PM, Stephen Warren wrote:
> On 07/04/2012 07:15 AM, Prashant Gaikwad wrote:
>> Compiler optimizes code someway that even if clk->parents
>> is not NULL it tries to allocate parents array. Change the
>> condition so that compiler does not optimize it in wrong
>> way.
> If simply inverting the if test and swapping the if/else blocks solves
> some problem, that sounds like a compiler bug that we need to track down
> and file/fix.
>
>> Also, initialize i to num_parents to make sure parent
>> is searched using parent name if parents is NULL.
> Are you sure the change to initialize i wasn't all that was required to
> solve the problem though? Mike has applied a patch for this that'll be
> applied to 3.5-rcX and hence trickle into 3.6.
Just initializing i does not fix problem. The patch Mike has applied
does two things
1. remove warning for uninitialized i
2. invert the if test
next prev parent reply other threads:[~2012-07-05 17:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-04 13:15 [PATCH] clk: Fix cached parent ptrs allocation Prashant Gaikwad
2012-07-05 1:10 ` Prashant Gaikwad
2012-07-05 16:07 ` Stephen Warren
2012-07-05 17:21 ` Prashant Gaikwad [this message]
2012-07-05 18:44 ` Stephen Warren
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=4FF5CD0D.7030902@nvidia.com \
--to=pgaikwad@nvidia.com \
--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).