From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752819AbcBJFgm (ORCPT ); Wed, 10 Feb 2016 00:36:42 -0500 Received: from mail-pa0-f42.google.com ([209.85.220.42]:33955 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751127AbcBJFgk (ORCPT ); Wed, 10 Feb 2016 00:36:40 -0500 Date: Wed, 10 Feb 2016 11:06:37 +0530 From: Viresh Kumar To: "Rafael J. Wysocki" Cc: Rafael Wysocki , Juri Lelli , Lists linaro-kernel , "linux-pm@vger.kernel.org" , Shilpasri G Bhat , Linux Kernel Mailing List Subject: Re: [PATCH V4 5/7] cpufreq: governor: No need to manage state machine now Message-ID: <20160210053637.GP22111@vireshk> References: <9b7ac57013a525863d6c0c5e86419744d37879a4.1454988792.git.viresh.kumar@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 10-02-16, 01:36, Rafael J. Wysocki wrote: > > static int cpufreq_governor_stop(struct cpufreq_policy *policy) > > { > > - struct policy_dbs_info *policy_dbs = policy->governor_data; > > - > > - /* State should be equivalent to START */ > > - if (!policy_dbs->policy) > > - return -EBUSY; > > - > > - gov_cancel_work(policy_dbs); > > - policy_dbs->policy = NULL; > > + gov_cancel_work(policy); > > > > return 0; > > } > > So maybe we can call gov_cancel_work(policy) from > cpufreq_governor_dbs() directly and get rid of this wrapper too? I thought about it, but left it for consistency. It wouldn't hurt, the compiler will anyway make it inline I believe. -- viresh