From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756191AbbICEpx (ORCPT ); Thu, 3 Sep 2015 00:45:53 -0400 Received: from mail-pa0-f43.google.com ([209.85.220.43]:36286 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752839AbbICEpw (ORCPT ); Thu, 3 Sep 2015 00:45:52 -0400 Date: Thu, 3 Sep 2015 10:15:45 +0530 From: Viresh Kumar To: Rafael Wysocki Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, Kristen Carlson Accardi , open list , Sudeep Holla Subject: Re: [PATCH] cpufreq: pass policy to ->get() driver callback Message-ID: <20150903044545.GI13140@linux> References: <98e79b26d8250c33001c7a50378b0e288b8511db.1438339396.git.viresh.kumar@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <98e79b26d8250c33001c7a50378b0e288b8511db.1438339396.git.viresh.kumar@linaro.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 31-07-15, 16:14, Viresh Kumar wrote: > CPUFreq drivers today support ->get(cpu) callback, which returns current > clock rate of the CPU. The problem with ->get() is that it takes cpu > number as parameter and this unnecessarily makes things complex. > > Firstly the core gets the cpu number by doing operation 'policy->cpu' on > the policy and then many drivers need to get the policy back and so do > cpufreq_cpu_get(cpu) on the cpu passed as argument to ->get(). > > It would be better if we pass them 'policy' directly and drivers can use > policy->cpu if that's all they need. > > Signed-off-by: Viresh Kumar Is this getting moved to 4.4? -- viresh