From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752467AbcBOI4j (ORCPT ); Mon, 15 Feb 2016 03:56:39 -0500 Received: from mail-pf0-f180.google.com ([209.85.192.180]:36047 "EHLO mail-pf0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752304AbcBOI4h (ORCPT ); Mon, 15 Feb 2016 03:56:37 -0500 Date: Mon, 15 Feb 2016 14:26:29 +0530 From: Viresh Kumar To: "Rafael J. Wysocki" Cc: Linux PM list , Linux Kernel Mailing List , Juri Lelli Subject: Re: [PATCH 7/9] cpufreq: governor: Move rate_mult to struct policy_dbs Message-ID: <20160215085629.GO6334@vireshk-i7> References: <3329748.lhJgppdTt9@vostro.rjw.lan> <2464597.suxGYOfmRx@vostro.rjw.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2464597.suxGYOfmRx@vostro.rjw.lan> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 15-02-16, 02:20, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > The rate_mult field in struct od_cpu_dbs_info_s is used by the code > shared with the conservative governor and to access it that code > has to do an ugly governor type check. However, first of all it > is ever only used for policy->cpu, so it is per-policy rather than > per-CPU and second, it is initialized to 1 by cpufreq_governor_start(), > so if the conservative governor never modifies it, it will have no > effect on the results of any computations. > > For these reasons, move rate_mult to struct policy_dbs_info (as a > common field). > > Signed-off-by: Rafael J. Wysocki > --- > drivers/cpufreq/cpufreq_governor.c | 25 +++++++++---------------- > drivers/cpufreq/cpufreq_governor.h | 3 ++- > drivers/cpufreq/cpufreq_ondemand.c | 23 +++++++++++++++-------- > 3 files changed, 26 insertions(+), 25 deletions(-) Acked-by: Viresh Kumar -- viresh