From mboxrd@z Thu Jan 1 00:00:00 1970 From: Viresh Kumar Subject: Re: [PATCH V3 6/9] cpufreq: imx: Use 'index' only to index into policy->freq_table Date: Mon, 6 Jun 2016 09:28:17 +0530 Message-ID: <20160606035817.GA16176@vireshk-i7> References: <5be64daa9fc2967351f7e5949b814d866264598e.1464960877.git.viresh.kumar@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <5be64daa9fc2967351f7e5949b814d866264598e.1464960877.git.viresh.kumar@linaro.org> Sender: linux-kernel-owner@vger.kernel.org To: Rafael Wysocki , Shawn Guo Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, steve.muckle@linaro.org, Dmitry Eremin-Solenikov , Krzysztof Kozlowski , Kukjin Kim , Steven Miao List-Id: linux-pm@vger.kernel.org On 03-06-16, 19:05, Viresh Kumar wrote: > Later patches would make changes in cpufreq core, after which > policy->freq_table may be reordered by cpufreq core and it wouldn't be > safe anymore to use 'index' for any other local arrays. > > To prepare for that, use policy->freq_table[index].driver_data for other > driver specific usage of 'index'. The 'driver_data' fields are already > set properly by the driver. > > Cc: Shawn Guo > Signed-off-by: Viresh Kumar > --- > drivers/cpufreq/imx6q-cpufreq.c | 13 ++++++++++--- > 1 file changed, 10 insertions(+), 3 deletions(-) Fixing Shawn's id. -- viresh