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=-8.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 B7BE1C4360C for ; Wed, 2 Oct 2019 21:33:38 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8C34F2070B for ; Wed, 2 Oct 2019 21:33:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="EDqz1oev"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="egPSRHXx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8C34F2070B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=D+zlFxPmjtvRzf7nbgQrzvAu3cw0p154caULxI4B1ZQ=; b=EDqz1oevJ0Uzvk VyQVSoifOgydQagKwhQHL+3J38UGRFSb6R8WmAUa/lTfuQuFqzrAW58l+ONtqsJdT/GJp85+c/2Ts e8VHJqBXVZFjvxcbDktLE+ydAjObPEctdZarcc/wqSUxhzCHD2emD3udumLloo26hfOzAlD2QYu8w +CzOD8k82nV2y9Um3GsTxME+GlbWWP1CNaXZ6+D3ng+xPZk6PDXxOOM1hqVGLyx/V6E8DpM6BdyLK XdG6kGrmt8z05pTbhwctp+8wAfxLJ/TGUPyeIOW79v5OT1ZTIr8A1N2ecsziVTfgBEf4QXpXZNXl2 OpsyHcmd25Mq1Orn8cHg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iFmFd-0003BW-RC; Wed, 02 Oct 2019 21:33:37 +0000 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1iFmFa-0003Al-HM for linux-arm-kernel@lists.infradead.org; Wed, 02 Oct 2019 21:33:35 +0000 Received: by mail-pf1-x441.google.com with SMTP id x127so304742pfb.7 for ; Wed, 02 Oct 2019 14:33:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=8XR0z8nVsrTH9SjYUvL864JxswMR5JXpGrN9af9PQc0=; b=egPSRHXxNXrqsqqU3qFdaZ/q1JB3mN2LSZEDi7SwD9fc3pG/S2pxMLfZZmx8Wrx1ws iDcUFhanpu0/y9JLriS74G9REK/5Xi6gCaIg0t3Fj8BTEekt0nq3CUfw8bYPAquqc+ii WEr2VvrLcKtzsTki0nP3KtJ/TSuOCUOLYnj0U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=8XR0z8nVsrTH9SjYUvL864JxswMR5JXpGrN9af9PQc0=; b=nM3UxoeUuhnwVl9/9R3j2XvRWKPzPlBnUzFrdQkPiwmey/7GfvuQsUEmvawLjnILk5 luaib8PJYFBzjRtc5qc6OP4s9xvztytfJdknepgj3YoQsMn6UUwtR6YyvovJpp/Ev8wL nOYwyrulVkn9utSV+9lnbbu/xoyxVA3ulMEU1FvUtWGup9/wF2cgKhkDzzHp09hbMXfK 7+vP0oNSt6C8zU77t9HeWzgx5DKpIpr4/hrR/+5h8UwRVpEHrZ2yptLvHbmLBu79a2N3 GfSpWEsivFvK74PlopL4Rb3Yy1PS4ubQhWBI2OQGMTBhytiPXuBOhw6ftoRaljEph8m7 fS9g== X-Gm-Message-State: APjAAAWtI7Fo6E/Umn/5iNSToeZu2sC3TAD7qobVG3xrAV5yhhtsBq8G Ej6R6pBudyA/STdwIcQSGbLZsw== X-Google-Smtp-Source: APXvYqyQIgtvZsqL/4S3dtAlXaur3e2GH1E+K5/9qdE4PswmIsWs22/2sffAY0ZoGs1OpAIqAJbbLg== X-Received: by 2002:a17:90b:903:: with SMTP id bo3mr6676659pjb.52.1570052013681; Wed, 02 Oct 2019 14:33:33 -0700 (PDT) Received: from localhost ([2620:15c:202:1:4fff:7a6b:a335:8fde]) by smtp.gmail.com with ESMTPSA id p189sm288617pga.2.2019.10.02.14.33.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 02 Oct 2019 14:33:32 -0700 (PDT) Date: Wed, 2 Oct 2019 14:33:30 -0700 From: Matthias Kaehlcke To: Leonard Crestez Subject: Re: [PATCH v9 3/8] PM / devfreq: Set scaling_max_freq to max on OPP notifier error Message-ID: <20191002213330.GG87296@google.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191002_143334_605055_15F650FD X-CRM114-Status: GOOD ( 18.37 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Artur =?utf-8?B?xZp3aWdvxYQ=?= , Abel Vesa , Saravana Kannan , linux-pm@vger.kernel.org, Viresh Kumar , NXP Linux Team , Krzysztof Kozlowski , Lukasz Luba , Chanwoo Choi , Kyungmin Park , MyungJoo Ham , Alexandre Bailon , Georgi Djakov , linux-arm-kernel@lists.infradead.org, Jacky Bai Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Oct 02, 2019 at 10:25:06PM +0300, Leonard Crestez wrote: > The devfreq_notifier_call functions will update scaling_min_freq and > scaling_max_freq when the OPP table is updated. > > If fetching the maximum frequency fails then scaling_max_freq remains > set to zero which is confusing. Set to ULONG_MAX instead so we don't > need special handling for this case in other places. > > Signed-off-by: Leonard Crestez > --- > drivers/devfreq/devfreq.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c > index 32bbf6e80380..3e0e936185a3 100644 > --- a/drivers/devfreq/devfreq.c > +++ b/drivers/devfreq/devfreq.c > @@ -557,12 +557,14 @@ static int devfreq_notifier_call(struct notifier_block *nb, unsigned long type, > devfreq->scaling_min_freq = find_available_min_freq(devfreq); > if (!devfreq->scaling_min_freq) > goto out; > > devfreq->scaling_max_freq = find_available_max_freq(devfreq); > - if (!devfreq->scaling_max_freq) > + if (!devfreq->scaling_max_freq) { > + devfreq->scaling_max_freq = ULONG_MAX; > goto out; > + } > > err = update_devfreq(devfreq); > > out: > mutex_unlock(&devfreq->lock); > -- > 2.17.1 > Reviewed-by: Matthias Kaehlcke _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel