From: nm@ti.com (Menon, Nishanth)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: OMAP2+: OPP: Fix to ensure check of right oppdef after bad one
Date: Fri, 1 Jun 2012 02:05:55 -0500 [thread overview]
Message-ID: <CAOMWX4dP4ES7AD0X1p2kONnx951iz8Y0sH12FHkDjaoJ=f4xBQ@mail.gmail.com> (raw)
In-Reply-To: <4FC86926.5050404@compulab.co.il>
On Fri, Jun 1, 2012 at 2:03 AM, Igor Grinberg <grinberg@compulab.co.il> wrote:
>
> On 06/01/12 02:15, Kevin Hilman wrote:
>> Nishanth Menon <nm@ti.com> writes:
>>
>>> Commit 9fa2df6b90786301b175e264f5fa9846aba81a65
>>> (ARM: OMAP2+: OPP: allow OPP enumeration to continue if device is not present)
>>> makes the logic:
>>> for (i = 0; i < opp_def_size; i++) {
>>> ? ? ?<snip>
>>> ? ? ?if (!oh || !oh->od) {
>>> ? ? ? ? ? ? ?<snip>
>>> ? ? ? ? ? ? ?continue;
>>> ? ? ?}
>>> <snip>
>>> opp_def++;
>>> }
>>>
>>> In short, the moment we hit a "Bad OPP", we end up looping the list
>>> comparing against the bad opp definition pointer for the rest of the
>>> iteration count. Instead, increment opp_def in the for loop itself
>>> and allow continue to be used in code without much thought so that
>>> we check the next set of OPP definition pointers :)
>>>
>>> Cc: Kevin Hilman <khilman@ti.com>
>>> Cc: Steve Sakoman <steve@sakoman.com>
>>> Cc: Tony Lindgren <tony@atomide.com>
>>> Cc: linux-omap at vger.kernel.org
>>> Cc: linux-arm-kernel at lists.infradead.org
>>>
>>> Signed-off-by: Nishanth Menon <nm@ti.com>
>>
>> Good catch.
>>
>> Queuing for my next set of PM fixes for v3.5-rc (branch: for_3.5/fixes/pm-2)
>
> I think this should also apply for stable, right?
> If it should, can you please add a
> Cc: stable at vger.kernel.org
I would like to think so, but punting over to Kevin on that decision.
Regards,
Nishanth Menon
next prev parent reply other threads:[~2012-06-01 7:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-18 17:26 [PATCH] ARM: OMAP2+: OPP: Fix to ensure check of right oppdef after bad one Nishanth Menon
2012-05-31 23:15 ` Kevin Hilman
2012-06-01 7:03 ` Igor Grinberg
2012-06-01 7:05 ` Menon, Nishanth [this message]
2012-06-01 13:54 ` Kevin Hilman
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='CAOMWX4dP4ES7AD0X1p2kONnx951iz8Y0sH12FHkDjaoJ=f4xBQ@mail.gmail.com' \
--to=nm@ti.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).