From: Viresh Kumar Date: Tue, 6 Jan 2015 15:39:05 +0000 (+0530) Subject: cpufreq: stats: pass 'stat' to cpufreq_stats_update() X-Git-Tag: fixes-v4.0-rc1~160^2~1^2~22 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2aba0c1bae564a59fc38c407abf7985f9e347cc4;p=pandora-kernel.git cpufreq: stats: pass 'stat' to cpufreq_stats_update() It is better to pass a struct cpufreq_stats pointer to cpufreq_stats_update() instead of a CPU number, because that's all it needs. Even if we pass a cpu number to cpufreq_stats_update(), it reads the per-cpu variable to get 'stats' out of it. So we are doing these operations unnecessarily: - First getting the cpu number to pass to cpufreq_stats_update(), stat->cpu. - And then getting stats from the cpu, per_cpu(cpufreq_stats_table, cpu). Reviewed-by: Prarit Bhargava Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki --- Reading git-diff-tree failed