[PATCH V2 1/4] cpufreq: exynos: Adding cpufreq driver for exynos5440
Viresh Kumar
viresh.kumar at linaro.org
Wed Mar 6 01:21:53 EST 2013
On 6 March 2013 13:35, amit kachhap <amit.kachhap at gmail.com> wrote:
> On Tue, Mar 5, 2013 at 6:48 AM, Viresh Kumar <viresh.kumar at linaro.org> wrote:
>>> +static void exynos_cpufreq_work(struct work_struct *work)
>>> +{
>>> + unsigned int cur_pstate, index;
>>> + struct cpufreq_policy *policy = cpufreq_cpu_get(0); /* boot CPU */
>>> + struct cpufreq_frequency_table *freq_table = dvfs_info->freq_table;
>>> +
>>> + if (policy == NULL)
>>> + goto skip_work;
>>
>> How can that be true? And if it can be, you will miss POSTCHANGE notifications
>> too.
> This skip of POSTCHANGE notifications is needed in one case where
> bootup frequency does not match with any elements of cpufreq table and
> hence I simply assign the highest frequency. Also cpufreq driver is
> not registered at this point.
I will keep a variable for that then, otherwise its misleading... So keep a
variable like cpufreq_enabled for it and set it to 1 as soon as this first
interrupt is gone... keep it in unlikely() too.
>>> + dvfs_info = kzalloc(sizeof(struct exynos_dvfs_data), GFP_KERNEL);
>>
>> sizeof(*dvfs_info) ??
> Isn't both same?
You need to read Documentation/CodingStyle.
More information about the linux-arm-kernel
mailing list