From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5A63AC4321A for ; Thu, 27 Jun 2019 21:52:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 363E12075E for ; Thu, 27 Jun 2019 21:52:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726463AbfF0Vwd (ORCPT ); Thu, 27 Jun 2019 17:52:33 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:50247 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726384AbfF0Vwd (ORCPT ); Thu, 27 Jun 2019 17:52:33 -0400 Received: from 79.184.254.216.ipv4.supernova.orange.pl (79.184.254.216) (HELO kreacher.localnet) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.267) id 85ea1641cc35ec6f; Thu, 27 Jun 2019 23:52:31 +0200 From: "Rafael J. Wysocki" To: Viresh Kumar Cc: linux-pm@vger.kernel.org, Vincent Guittot , linux-kernel@vger.kernel.org Subject: Re: [PATCH V2 1/5] cpufreq: Remove the redundant !setpolicy check Date: Thu, 27 Jun 2019 23:52:31 +0200 Message-ID: <2485108.CxIRPt9KNH@kreacher> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org On Thursday, June 20, 2019 5:05:46 AM CEST Viresh Kumar wrote: > cpufreq_start_governor() is only called for !setpolicy case, checking it > again is not required. > > Signed-off-by: Viresh Kumar > --- > drivers/cpufreq/cpufreq.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c > index 85ff958e01f1..54befd775bd6 100644 > --- a/drivers/cpufreq/cpufreq.c > +++ b/drivers/cpufreq/cpufreq.c > @@ -2153,7 +2153,7 @@ static int cpufreq_start_governor(struct cpufreq_policy *policy) > > pr_debug("%s: for CPU %u\n", __func__, policy->cpu); > > - if (cpufreq_driver->get && !cpufreq_driver->setpolicy) > + if (cpufreq_driver->get) > cpufreq_update_current_freq(policy); > > if (policy->governor->start) { > Applied, thanks!