From: Stephen Warren <swarren@wwwdotorg.org>
To: Prashant Gaikwad <pgaikwad@nvidia.com>
Cc: "mturquette@ti.com" <mturquette@ti.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] clk: Fix cached parent ptrs allocation
Date: Thu, 05 Jul 2012 12:44:01 -0600 [thread overview]
Message-ID: <4FF5E071.3090106@wwwdotorg.org> (raw)
In-Reply-To: <4FF5CD0D.7030902@nvidia.com>
On 07/05/2012 11:21 AM, Prashant Gaikwad wrote:
> 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
Yes, but Mike's patch is very different to yours. Your patch description
says that you need to invert the if test to work around the compiler
optimizer so that it doesn't "optimize it in wrong way", whereas the
patch Mike applied was for a legitimate bug in the code; those are two
entirely different things.
prev parent reply other threads:[~2012-07-05 18:44 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
2012-07-05 18:44 ` Stephen Warren [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=4FF5E071.3090106@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@ti.com \
--cc=pgaikwad@nvidia.com \
/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