From: Romit Dasgupta <romit@ti.com>
To: Nishanth Menon <menon.nishanth@gmail.com>
Cc: "khilman@deeprootsystems.com" <khilman@deeprootsystems.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 18:52:07 +0530 [thread overview]
Message-ID: <4B4DC8FF.8090606@ti.com> (raw)
In-Reply-To: <4B4DC297.8070703@gmail.com>
Nishanth Menon wrote:
> Romit Dasgupta said the following on 01/13/2010 04:41 AM:
>> Menon, Nishanth wrote:
>>
>>> General comment: might be good to state the enum types you are introducing
>>> for OMAP3 in the commit message
>>>
>> Actually the introduction of enum type itself is the heart of the patch. The
>> details are irrelevant.
>>
> could you be a little more verbose as to what is irrelevant? the OMAP3
> enums descriptions in commit message?
Yes, because they are going to be SoC specific.
>
>>>> Signed-off-by: Romit Dasgupta <romit@ti.com>
>>>> ---
>>>>
>>>> omap3_opp_def_list = cpu_is_omap3630() ? omap36xx_opp_def_list :
>>>> omap34xx_opp_def_list;
>>>> - for (i = 0; i < ARRAY_SIZE(omap3_rate_tables); i++) {
>>>> - *omap3_rate_tables[i] = opp_init_list(omap3_opp_def_list[i]);
>>>> + entries = cpu_is_omap3630() ? ARRAY_SIZE(omap34xx_opp_def_list) :
>>>> + ARRAY_SIZE(omap36xx_opp_def_list);
>>>> + for (i = 1; i <= entries; i++) {
>>>> + ret = opp_init_list(i, omap3_opp_def_list[i - 1]);
>>>>
>>> a) if you remove OPP_NONE, i-1 is not needed (same everywhere in the patch)
>>>
>> Frankly, I did not want to introduce OPP_NONE but did so as you are checking all
>> parameters passed to the OPP APIs.
>>
> Lets remove it then.
OK
>>
>>
> definition of enum and the implicit usage of enums are in two different
> files. there is a distinct possibility of some one modifying the header
> without actually knowing that .c depends on the exact values of the enum
> definition.
As I said before one needs to make changes in the kernel by knowing what they
are doing.
>
> pm34xx.c has no right to depend on opp.h definition values -> if it does
> it ties it down and a constraint for future flexibility. please change.
The right approach should be to take out the loop in pm34xx.c for now and
explicitly call the opp_init_list function after passing OPP_MPU, OPP_L3,
OPP_DSP in any order. So pm34xx.c needs to change not opp.[ch]. What do you think?
>>>> */
>>>> -static int __deprecated opp_to_freq(unsigned long *freq,
>>>> - const struct omap_opp *opps, u8 opp_id)
>>>> +static int __deprecated opp_to_freq(unsigned long *freq, enum opp_t opp_t,
>>>>
>>> Enum type and variable have the same name :( mebbe a rename of variable is
>>> appropriate
>>>
>> Not sure why you say this. Did you see the compiler throwing up any warning?
>>
> The usage later in the code is opp_t -> this is a readability issue not
> a compiler warning.
What is the readability issue? Why cant we declare something like enum opp_t opp_t?
>>> 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.
>>
> hmm.. interesting.. can you elaborate with exact functions?
omap3_pm_init_opp_table
>
> if you are removing this check, please do a follow up patch and maintain
> equivalent one for this so that the patch does exactly what the commit
> message says "introduce enums" - not do something more.
>
How on earth?? I have removed mpu_opps, l3_opps, dsp_opps from the code so how
do you think I should preserve the checking of the variables when they don't exist.
next prev parent reply other threads:[~2010-01-13 13:22 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 [this message]
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
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=4B4DC8FF.8090606@ti.com \
--to=romit@ti.com \
--cc=khilman@deeprootsystems.com \
--cc=linux-omap@vger.kernel.org \
--cc=menon.nishanth@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.