From: Kevin Hilman <khilman@deeprootsystems.com>
To: Romit Dasgupta <romit@ti.com>
Cc: "Menon, Nishanth" <nm@ti.com>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: Re: [PM-WIP-OPP][PATCH] OPP: Introduces enum for addressing different OPP types
Date: Wed, 13 Jan 2010 06:43:48 -0800 [thread overview]
Message-ID: <87skaa3w0r.fsf@deeprootsystems.com> (raw)
In-Reply-To: <4B4DA36C.7040206@ti.com> (Romit Dasgupta's message of "Wed\, 13 Jan 2010 16\:11\:48 +0530")
Romit Dasgupta <romit@ti.com> writes:
> Menon, Nishanth wrote:
>>
[...]
>>> -static int __deprecated freq_to_opp(u8 *opp_id, struct omap_opp *opps,
>>> +static int __deprecated freq_to_opp(u8 *opp_id, enum opp_t opp_t,
>> Re: enum type and variable have the same name :( mebbe a rename of variable is
>> appropriate
>>> unsigned long freq)
>>> {
>>> struct omap_opp *opp;
>>>
>>> - BUG_ON(!opp_id || !opps);
>>> - opp = opp_find_freq_ceil(opps, &freq);
>>> + BUG_ON(opp_t == OPP_NONE || opp_t > OPP_TYPES);
>>> + opp = opp_find_freq_ceil(opp_t, &freq);
>>> if (IS_ERR(opp))
>>> return -EINVAL;
>>> *opp_id = opp_get_opp_id(opp);
>>> @@ -218,9 +218,6 @@ void init_opp(struct shared_resource *resp)
>>> u8 opp_id;
>>> resp->no_of_users = 0;
>>>
>>> - if (!mpu_opps || !dsp_opps || !l3_opps)
>>> - return;
>>> -
>> the original intent of this check is lost here - if the initializations did not
>> take place, we will not proceed. An equivalent check might be good to maintain
>> at this point.
>
> You are partially correct. I took off the checks because we have a BUG_ON() call
> in the beginning of the boot code right after we initialize the OPP tables. So
> we should not hit this check.
Please do not code things based on the the existence of BUG_ON().
All of these BUG* points need to be removed as we none of these are fatal. We need
better error recovery, most likely using WARN* and returning error codes.
Kevin
prev parent reply other threads:[~2010-01-13 14:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-12 12:39 [PM-WIP-OPP][PATCH] OPP: Introduces enum for addressing different OPP types Romit Dasgupta
2010-01-12 17:19 ` Nishanth Menon
2010-01-12 17:19 ` Kevin Hilman
2010-01-12 17:36 ` Cousson, Benoit
2010-01-12 19:26 ` Kevin Hilman
2010-01-13 10:31 ` Romit Dasgupta
2010-01-12 17:57 ` Menon, Nishanth
2010-01-13 10:41 ` Romit Dasgupta
2010-01-13 12:54 ` Nishanth Menon
2010-01-13 13:22 ` Romit Dasgupta
2010-01-15 10:35 ` Nishanth Menon
2010-01-15 10:42 ` Romit Dasgupta
2010-01-15 10:56 ` Nishanth Menon
2010-01-13 14:43 ` Kevin Hilman [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=87skaa3w0r.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=linux-omap@vger.kernel.org \
--cc=nm@ti.com \
--cc=romit@ti.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