Re: [PATCH V2 2/6] cpufreq: Remove cpufreq_frequency_get_table()

2016-06-02 Thread Viresh Kumar
On 02-06-16, 19:02, Javi Merino wrote: > On Thu, Jun 02, 2016 at 09:06:26PM +0530, Viresh Kumar wrote: > > On 2 June 2016 at 20:29, Javi Merino wrote: > > > In 5a31d594a973 ("cpufreq: Allow freq_table to be obtained for offline > > > CPUs") you did the opposite: don't use cpufreq_cpu_get_raw() bec

Re: [PATCH V2 2/6] cpufreq: Remove cpufreq_frequency_get_table()

2016-06-02 Thread Javi Merino
On Thu, Jun 02, 2016 at 09:06:26PM +0530, Viresh Kumar wrote: > On 2 June 2016 at 20:29, Javi Merino wrote: > > In 5a31d594a973 ("cpufreq: Allow freq_table to be obtained for offline > > CPUs") you did the opposite: don't use cpufreq_cpu_get_raw() because > > it won't give you the policy of a cpu

Re: [PATCH V2 2/6] cpufreq: Remove cpufreq_frequency_get_table()

2016-06-02 Thread Viresh Kumar
On 2 June 2016 at 20:29, Javi Merino wrote: > In 5a31d594a973 ("cpufreq: Allow freq_table to be obtained for offline > CPUs") you did the opposite: don't use cpufreq_cpu_get_raw() because > it won't give you the policy of a cpu that is offline. Now you are > arguing that we should go back to cpuf

Re: [PATCH V2 2/6] cpufreq: Remove cpufreq_frequency_get_table()

2016-06-02 Thread Javi Merino
Hi Viresh, On Thu, Jun 02, 2016 at 07:34:56PM +0530, Viresh Kumar wrote: > Most of the callers of cpufreq_frequency_get_table() already have the > pointer to a valid 'policy' structure and they don't really need to go > through the per-cpu variable first and then a check to validate the > frequenc

[PATCH V2 2/6] cpufreq: Remove cpufreq_frequency_get_table()

2016-06-02 Thread Viresh Kumar
Most of the callers of cpufreq_frequency_get_table() already have the pointer to a valid 'policy' structure and they don't really need to go through the per-cpu variable first and then a check to validate the frequency, in order to find the freq-table for the policy. Directly use the policy->freq_