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 7A1B1CA9EC0 for ; Mon, 28 Oct 2019 15:23:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 54C86222C5 for ; Mon, 28 Oct 2019 15:23:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729297AbfJ1PXb (ORCPT ); Mon, 28 Oct 2019 11:23:31 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:57551 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728522AbfJ1PXb (ORCPT ); Mon, 28 Oct 2019 11:23:31 -0400 Received: from cust-east-parth2-46-193-72-114.wb.wifirst.net (46.193.72.114) (HELO kreacher.localnet) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.292) id c030794400d0e802; Mon, 28 Oct 2019 16:23:29 +0100 From: "Rafael J. Wysocki" To: Viresh Kumar Cc: linux-pm@vger.kernel.org, Vincent Guittot , "Rafael J . Wysocki" , linux-kernel@vger.kernel.org Subject: Re: [PATCH] cpufreq: Clarify the comment in cpufreq_set_policy() Date: Mon, 28 Oct 2019 16:23:28 +0100 Message-ID: <3398893.vxru0tI2Zt@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 Tuesday, October 22, 2019 12:17:57 PM CET Viresh Kumar wrote: > One of the responsibility of the ->verify() callback is to make sure > that the policy's min frequency is <= max frequency as this isn't > guaranteed by the QoS framework which gave us those values. > > Update the comment in cpufreq_set_policy() to clarify that. > > Suggested-by: Rafael J. Wysocki > Signed-off-by: Viresh Kumar > --- > drivers/cpufreq/cpufreq.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c > index 2e698b5f0f80..b4b5f11c2f1e 100644 > --- a/drivers/cpufreq/cpufreq.c > +++ b/drivers/cpufreq/cpufreq.c > @@ -2384,7 +2384,10 @@ int cpufreq_set_policy(struct cpufreq_policy *policy, > new_policy->min = freq_qos_read_value(&policy->constraints, FREQ_QOS_MIN); > new_policy->max = freq_qos_read_value(&policy->constraints, FREQ_QOS_MAX); > > - /* verify the cpu speed can be set within this limit */ > + /* > + * Verify that the cpu speed can be set within this limit and make sure > + * min <= max. > + */ > ret = cpufreq_driver->verify(new_policy); > if (ret) > return ret; > Applying for 5.5, thanks!