Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757188AbcCCTjI (ORCPT ); Thu, 3 Mar 2016 14:39:08 -0500 Received: from mail-lb0-f196.google.com ([209.85.217.196]:32964 "EHLO mail-lb0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753414AbcCCTjE (ORCPT ); Thu, 3 Mar 2016 14:39:04 -0500 MIME-Version: 1.0 In-Reply-To: <20160303111858.GM6356@twins.programming.kicks-ass.net> References: <2495375.dFbdlAZmA6@vostro.rjw.lan> <26020775.9hJG2SHiH2@vostro.rjw.lan> <20160303111858.GM6356@twins.programming.kicks-ass.net> Date: Thu, 3 Mar 2016 20:39:02 +0100 X-Google-Sender-Auth: WnLsMTG_FY0b_bV0lb8ricTv-Kc Message-ID: Subject: Re: [PATCH 5/6] cpufreq: Support for fast frequency switching From: "Rafael J. Wysocki" To: Peter Zijlstra Cc: "Rafael J. Wysocki" , Linux PM list , Juri Lelli , Steve Muckle , ACPI Devel Maling List , Linux Kernel Mailing List , Srinivas Pandruvada , Viresh Kumar , Vincent Guittot , Michael Turquette Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 554 Lines: 16 On Thu, Mar 3, 2016 at 12:18 PM, Peter Zijlstra wrote: > On Wed, Mar 02, 2016 at 03:12:33AM +0100, Rafael J. Wysocki wrote: >> +void cpufreq_driver_fast_switch(struct cpufreq_policy *policy, >> + unsigned int target_freq, unsigned int relation) >> +{ >> + unsigned int freq; >> + >> + if (target_freq == policy->cur) >> + return; > > But what if relation is different from last time? ;-) Doh Never mind, I'll drop this check (that said this mistake is present elsewhere too IIRC).