Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1986409imm; Sun, 27 May 2018 22:29:57 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr9bJNXUtzNsLekeKU6x0CWfVkpxeFc/w0neGVL+tNEnLD/o4UfUCzqXV0J5va5oefpc/CA X-Received: by 2002:a17:902:7008:: with SMTP id y8-v6mr12059984plk.141.1527485397075; Sun, 27 May 2018 22:29:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527485397; cv=none; d=google.com; s=arc-20160816; b=ezaOq2TwR8PL19lFlQZmXZi5YAEI1X0yIuSf3a5F7g/+wJrWkjMlKANdEKrmGKumKn KFddFKV2X+CXfrTZZsbVJ7eqL7DFDojPUwUtjYnt9/u2OWHQTb7Dm+W/OgBzM0qA60CT D6wk7ZJNMXmwh2D6mct8BvzxFXSNWopAS0rZhabjaLexUTcKkMAp4AqzaHmsgnWtMFmI n5+id3tVuh+cg8iDkxnWtgEDPvHqx3njwPudgrPR5iwEVbfaBusSdkF6zo3gYnVCgvsX u07Eq6uDYDWdZNce/AMW4hH7uFalOogB/PKrAhacVMa8U7xY7h7mFwuOHTJgS/u8pljD cAQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:dlp-filter:cms-type :in-reply-to:subject:cc:to:user-agent:organization:from:date :message-id:content-transfer-encoding:mime-version:dkim-signature :dkim-filter:arc-authentication-results; bh=BlCIo2/WYDG2dayTyiDWggdDSmXPt2PMMSVUUO6Y0XM=; b=KGdsWVtA2rN2hNAJdzfEc6KcbJo2aZrjDj+G7P88m792aDSCAsQ2fPSwC+DvwYAlEb B8bOh3gjzewLwvyV9SLlu99kLMsaCTN5oHgjPcJFz70OvLnlpbPGEumRUegafRnbC5Go g4oXjg09gw9UTcFYi5Dlvu9tFi+lvZVRAfo4wddpsyNwTmKScCBM8Rnzu7IodnO+gfTm cX59Vb6kN7WNYOeK5KmqN3wjLN90ssgvSAZp6wapLI94Jyso+hHlc2uitz97efVQq5K2 N9XiqPfpuvDTcF0mHTUIvBqz0U6tmRS6L5D9PeBdOO/oYrv1uvxiVUI8txOTR/CDLlmL ztVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=ARb6dM7R; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 34-v6si28959334plc.346.2018.05.27.22.29.42; Sun, 27 May 2018 22:29:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=ARb6dM7R; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753308AbeE1F2C (ORCPT + 99 others); Mon, 28 May 2018 01:28:02 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:19404 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753137AbeE1F17 (ORCPT ); Mon, 28 May 2018 01:27:59 -0400 Received: from epcas1p3.samsung.com (unknown [182.195.41.47]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20180528052757epoutp010f5b8fd2f525a695b50899aed896b9f2~yt8RM6b2f1090610906epoutp01W; Mon, 28 May 2018 05:27:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20180528052757epoutp010f5b8fd2f525a695b50899aed896b9f2~yt8RM6b2f1090610906epoutp01W DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1527485277; bh=BlCIo2/WYDG2dayTyiDWggdDSmXPt2PMMSVUUO6Y0XM=; h=Date:From:To:Cc:Subject:In-reply-to:References:From; b=ARb6dM7R4GDYFRTpulp5l9vIqwvJbexmK4Gc+ujANgqpCedhl49cq4eyYyvvDCD99 VZPvTA/4/tKfVlXa5lZf0pL5+Nl2d/+3FD9sf3w1npF8eCgSd6ehQASg+VnxSV2woa HnUFO28xT1cX/K6UXtC7g4n/cD22DMmOu1ZPSHvI= Received: from epsmges1p1.samsung.com (unknown [182.195.40.153]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20180528052755epcas1p4678e189080ea6f58aa816173fd677385~yt8PHYY5g1398013980epcas1p4K; Mon, 28 May 2018 05:27:55 +0000 (GMT) Received: from epcas1p2.samsung.com ( [182.195.41.46]) by epsmges1p1.samsung.com (Symantec Messaging Gateway) with SMTP id 3E.F4.04066.B539B0B5; Mon, 28 May 2018 14:27:55 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20180528052754epcas1p31170d7395d9f194c67d812f6e9508634~yt8OqdWjs0373603736epcas1p39; Mon, 28 May 2018 05:27:54 +0000 (GMT) X-AuditID: b6c32a35-ba1ff70000000fe2-38-5b0b935b4f6e Received: from epmmp1.local.host ( [203.254.227.16]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 54.09.03915.A539B0B5; Mon, 28 May 2018 14:27:54 +0900 (KST) MIME-version: 1.0 Content-transfer-encoding: 8BIT Content-type: text/plain; charset="UTF-8" Received: from [10.113.63.77] by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P9F008YRB6I7E00@mmp1.samsung.com>; Mon, 28 May 2018 14:27:54 +0900 (KST) Message-id: <5B0B935A.8010306@samsung.com> Date: Mon, 28 May 2018 14:27:54 +0900 From: Chanwoo Choi Organization: Samsung Electronics User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 To: Matthias Kaehlcke , MyungJoo Ham Cc: Kyungmin Park , Arnd Bergmann , Greg Kroah-Hartman , Rob Herring , Mark Rutland , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Brian Norris , Douglas Anderson Subject: Re: [PATCH 03/11] PM / devfreq: Remove check for df->max_freq == 0 from governors In-reply-to: <20180525203043.249193-4-mka@chromium.org> X-Brightmail-Tracker: H4sIAAAAAAAAA02Se0hTYRjG+3bOzjlay6+V9WGU81BBgsuzNXcKl91ZZSAUEVmtkx42yW26 s0kFwUq7mUnN6KK1FeEos4xpF6d2UTNI1NSiLCsqiu43s+ze2U5Rf33P+3y/F5735aUwZQkR Q2XZnLzDxmXTRCR+tmmiOiG9ZHB6Ym+TnP3haSHZwPu3ctbX3C5n2/yXCTb/aBXBtm16RbLd wYME27ezGbDltzplbN/px4C9u/EYwW5uaCanDzFWeiuB8dtXDzCWuTtxY6BiO2G8eKiSNBbX VABjX2BsGrmMT7bwXCbvUPG2DHtmls1soBcsMs0y6ZISmQRmCqunVTbOyhvo2alpCXOzssWk tCqPy3aJVhonCPSkackOu8vJqyx2wWmg0xlGo2YS9WqNRny1K6ZqdCKyirds/FiL53xVri0u sLhBcVQhiKAQnIzu+J/ICkEkpYTnAXpZdBKXis8ANeQ/xP5SpQX9f6g6gL4X1eGhDwUchgZK 7ouaojAYi5q71oRsDE5EZ+qqSIm/B1BX2SWZxMejHbs9ZEjjcDx60loDQpoQ/YvPbhMhHQXj 0M2Bx2E/Gi5Ftb5PYX4EXIQOf+kIp8NgvwwF3/jC0HC4HBU9uxEOFAH1yPurNwwhmE+ivSdP yaQRZqOHTU1A0sPRi6s1ZCg1gqNR1xWDxG8FaGuDF5OKPQC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ey1Eq1sz+M1jtIn5/bL27fJnvRb9voflxVP84X8TGYWlyjnczenf3j/pSjx2CPVMIv9 VxxmL4wLV5wgFxcstk7bzTJ028+gWrm5USck95VFLp7/WHWz83be1aeXBLX9fr+Fzfv6tFPX Bb5Plt91mU1baeLkJUudkpSLrZRYijMSDbWYi4oTARwfsaKUAgAA X-CMS-MailID: 20180528052754epcas1p31170d7395d9f194c67d812f6e9508634 X-Msg-Generator: CA CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20180525203351epcas2p1f22bcccf992edbc9ed76ba0bd42af752 References: <20180525203043.249193-1-mka@chromium.org> <20180525203043.249193-4-mka@chromium.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 2018년 05월 26일 05:30, Matthias Kaehlcke wrote: > Commit "PM / devfreq: Fix handling of min/max_freq == 0" ensures that > df->max_freq is not 0, remove unnecessary checks. > > Signed-off-by: Matthias Kaehlcke > --- > drivers/devfreq/governor_performance.c | 5 +---- > drivers/devfreq/governor_simpleondemand.c | 7 +++---- > 2 files changed, 4 insertions(+), 8 deletions(-) > > diff --git a/drivers/devfreq/governor_performance.c b/drivers/devfreq/governor_performance.c > index 4d23ecfbd948..1c990cb45098 100644 > --- a/drivers/devfreq/governor_performance.c > +++ b/drivers/devfreq/governor_performance.c > @@ -20,10 +20,7 @@ static int devfreq_performance_func(struct devfreq *df, > * target callback should be able to get floor value as > * said in devfreq.h > */ > - if (!df->max_freq) > - *freq = UINT_MAX; > - else > - *freq = df->max_freq; > + *freq = df->max_freq; > return 0; > } > > diff --git a/drivers/devfreq/governor_simpleondemand.c b/drivers/devfreq/governor_simpleondemand.c > index 28e0f2de7100..278964783fa6 100644 > --- a/drivers/devfreq/governor_simpleondemand.c > +++ b/drivers/devfreq/governor_simpleondemand.c > @@ -27,7 +27,6 @@ static int devfreq_simple_ondemand_func(struct devfreq *df, > unsigned int dfso_upthreshold = DFSO_UPTHRESHOLD; > unsigned int dfso_downdifferential = DFSO_DOWNDIFFERENCTIAL; > struct devfreq_simple_ondemand_data *data = df->data; > - unsigned long max = (df->max_freq) ? df->max_freq : UINT_MAX; > > err = devfreq_update_stats(df); > if (err) > @@ -47,7 +46,7 @@ static int devfreq_simple_ondemand_func(struct devfreq *df, > > /* Assume MAX if it is going to be divided by zero */ > if (stat->total_time == 0) { > - *freq = max; > + *freq = df->max_freq; > return 0; > } > > @@ -60,13 +59,13 @@ static int devfreq_simple_ondemand_func(struct devfreq *df, > /* Set MAX if it's busy enough */ > if (stat->busy_time * 100 > > stat->total_time * dfso_upthreshold) { > - *freq = max; > + *freq = df->max_freq; > return 0; > } > > /* Set MAX if we do not know the initial frequency */ > if (stat->current_frequency == 0) { > - *freq = max; > + *freq = df->max_freq; > return 0; > } > > Reviewed-by: Chanwoo Choi -- Best Regards, Chanwoo Choi Samsung Electronics