Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1984901imm; Sun, 27 May 2018 22:27:28 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpE0dBMeGOnieVsYz4cdRjEf/f2mOoAIW5ly+GDQrKaqJ4IZr8iMfJYN/ZPd7sKUPZD5BHv X-Received: by 2002:a17:902:54d:: with SMTP id 71-v6mr12233448plf.365.1527485248615; Sun, 27 May 2018 22:27:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527485248; cv=none; d=google.com; s=arc-20160816; b=TQM1N83IA8Booqlz4Wv8GedkO+nOVDICeVjIQ+zU2O0+OZAMssl+cJpbzF1nNh/YlB nVXHV8v41uqA36nekU+gAYUK3wr4Bn5QHKpzfX6d8s8sLHFayol2AIT/rvdbtrLZxvQD iFcNzZKn19QOuBkfUNKGS0/e9j2tj8oMF0ZWBABcLlKGeZrGJys5XB5n5lCgY/WcAAqe Kdv/AWS+dz/MtgmdTq4ljP8eNGOKO2IklzKYpyZBFSKrUT3ZLJS0sRNGSXmzPWGLD7Ul c0NGUkjcqh0v2KS9Cc7mXhaPjjds3is2ah4G/DPw9iG4mKIGaiUXaRvpKfgQSCMcCOO9 JxBQ== 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=dXUe37bKOSoJMv6lrLgw+S+vLr3BbVD5zW701YpGixI=; b=Ym0tMrlzBNWh31nykddSIRq5kMIIBANXgs1Xxl6XZp4o0JfjLlPr0yIA7ycYCBSNGK yYkwwlrwkMXg2gI3xP+b4O3uThaOXk1xpxiBD7o5paprEzZDQRfm3HbZbWVd1mAABBEJ sGWGGCRKgVc5cnt03X9TRuRTH6p2k2iNYvvNTBlWmhlfVepY64G/VzjeaiiwVj+Tc6WH PCTf9nsbZwYuGWNwNInJ03ftdpbIkU0lSf4toYIi7F7VugstEkuF+EBUdq1kCTQfblfX ZIJ+e7C719IzoYejgKObFlWxT/Ik2W2XL2jPcJ4n1EpGJwggWvfS9g04xNALHW0LDqML 2T4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=aedYKDR2; 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 q1-v6si21640562pgc.156.2018.05.27.22.27.14; Sun, 27 May 2018 22:27:28 -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=aedYKDR2; 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 S1753266AbeE1F06 (ORCPT + 99 others); Mon, 28 May 2018 01:26:58 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:55375 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751832AbeE1F0y (ORCPT ); Mon, 28 May 2018 01:26:54 -0400 Received: from epcas1p3.samsung.com (unknown [182.195.41.47]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20180528052652epoutp033233e242f6b336a8e80ab9a419d6b4f1~yt7VKYGNv2914629146epoutp03R; Mon, 28 May 2018 05:26:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20180528052652epoutp033233e242f6b336a8e80ab9a419d6b4f1~yt7VKYGNv2914629146epoutp03R DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1527485212; bh=dXUe37bKOSoJMv6lrLgw+S+vLr3BbVD5zW701YpGixI=; h=Date:From:To:Cc:Subject:In-reply-to:References:From; b=aedYKDR2ZR6CQIasHGqWN38Yz/g87xu17q/mi2KEupFVqZ9tUdA97BDDpvFIDMAHT q9KPcg0vlRfKE/pOnZufTFe6unr0lUjQJG8TbO8JHKQ+KGM2XMA3Dp3hVZWL4CiPym ZRyBCNup/d2YRoDKlA8G1pyNgagAjijBOatd7P7Y= Received: from epsmges1p3.samsung.com (unknown [182.195.40.157]) by epcas1p1.samsung.com (KnoxPortal) with ESMTP id 20180528052650epcas1p1cd182cbc1ae8abd67c23b533fe3f6e5a~yt7S2VviR2915029150epcas1p1l; Mon, 28 May 2018 05:26:50 +0000 (GMT) Received: from epcas1p2.samsung.com ( [182.195.41.46]) by epsmges1p3.samsung.com (Symantec Messaging Gateway) with SMTP id AB.05.04076.9139B0B5; Mon, 28 May 2018 14:26:50 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20180528052649epcas1p41f9f3c75c5ebc6edd9caf35ab5b639c3~yt7SM9f6g1532815328epcas1p4G; Mon, 28 May 2018 05:26:49 +0000 (GMT) X-AuditID: b6c32a37-a71ff70000000fec-2e-5b0b93190636 Received: from epmmp1.local.host ( [203.254.227.16]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 5F.F8.03915.9139B0B5; Mon, 28 May 2018 14:26:49 +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 <0P9F00D9RB4PZQB0@mmp1.samsung.com>; Mon, 28 May 2018 14:26:49 +0900 (KST) Message-id: <5B0B9319.9060709@samsung.com> Date: Mon, 28 May 2018 14:26:49 +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 01/11] PM / devfreq: Init user limits from OPP limits, not viceversa In-reply-to: <20180525203043.249193-2-mka@chromium.org> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprEJsWRmVeSWpSXmKPExsWy7bCmnq7UZO5og0trmSz+TjrGbrHp43tW i/lHzrFanF12kM2iefF6NouzTW/YLS7vmsNm8bn3CKPF0usXmSw+b3jMaHG7cQWbReveI+wO PB5r5q1h9Pj9axKjx+yGiywem1Z1snnsn7uG3aNvyypGj8+b5ALYo1JtMlITU1KLFFLzkvNT MvPSbZW8g+Od403NDAx1DS0tzJUU8hJzU22VXHwCdN0yc4AuVVIoS8wpBQoFJBYXK+nb2RTl l5akKmTkF5fYKkUbGhrpGRqY6xkZAWnjWCsjU6CShNSMUyv3MhacEqpY3fuVrYFxHX8XIyeH hICJRP/nKyxdjFwcQgI7GCVe/HvGCOF8Z5S4tmcCE0zVo7dnmSESuxklPt87yg6S4BUQlPgx +R5QOwcHs4C8xJFL2SBhZgFNia2717ND1N9llLj0cQoTRL2WxIxVn8B6WQRUJR6fWskIYrMB xfe/uMEGYvMLKEpc/fEYLC4qECGxc/43sHoRgWCJBT/Pg53KLPCVSWLXu/lgRcICURJNvQdY QWxOAXOJu9f3sEFc3cwucWOWNshxEgIuEi/niECEhSVeHd/CDhGWlrh01BZkpIRAO6NE+955 zBDOFEaJc9fvQX1vLPFsYRcTxGd8Eu++9rBCNPN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OnUmLWnZ54R KYjz3bB1Sde2m8+9MwNdeaa/2zznQHm5gNO8kw7JiZyMGfv9ZrcdETyj8TR4wTdLydPmJwzt 86v0d2elMd60qi3hqzTIO6c9M1KaN7RL/3UPY5RkL89lc14mqROm0/S0WxJmVvxc227+g803 VeLGPIMJLlmXzt0pZ23b3K7EUpyRaKjFXFScCABIUUuWlAIAAA== X-CMS-MailID: 20180528052649epcas1p41f9f3c75c5ebc6edd9caf35ab5b639c3 X-Msg-Generator: CA CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20180525203410epcas1p2fd2a35468b9c37f2c542e499d3ed5a03 References: <20180525203043.249193-1-mka@chromium.org> <20180525203043.249193-2-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 ab8f58ad72c4 ("PM / devfreq: Set min/max_freq when adding > the devfreq device") introduced the initialization of the user > limits min/max_freq from the lowest/highest available OPPs. Later > commit f1d981eaecf8 ("PM / devfreq: Use the available min/max > frequency") added scaling_min/max_freq, which actually represent > the frequencies of the lowest/highest available OPP. scaling_min/ > max_freq are initialized with the values from min/max_freq, which > is totally correct in the context, but a bit awkward to read. > > Swap the initialization and assign scaling_min/max_freq with the > OPP freqs and then the user limts min/max_freq with scaling_min/ > max_freq. > > Needless to say that this change is a NOP, intended to improve > readability. > > Signed-off-by: Matthias Kaehlcke > --- > drivers/devfreq/devfreq.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c > index fe2af6aa88fc..0057ef5b0a98 100644 > --- a/drivers/devfreq/devfreq.c > +++ b/drivers/devfreq/devfreq.c > @@ -604,21 +604,21 @@ struct devfreq *devfreq_add_device(struct device *dev, > mutex_lock(&devfreq->lock); > } > > - devfreq->min_freq = find_available_min_freq(devfreq); > - if (!devfreq->min_freq) { > + devfreq->scaling_min_freq = find_available_min_freq(devfreq); > + if (!devfreq->scaling_min_freq) { > mutex_unlock(&devfreq->lock); > err = -EINVAL; > goto err_dev; > } > - devfreq->scaling_min_freq = devfreq->min_freq; > + devfreq->min_freq = devfreq->scaling_min_freq; > > - devfreq->max_freq = find_available_max_freq(devfreq); > - if (!devfreq->max_freq) { > + devfreq->scaling_max_freq = find_available_max_freq(devfreq); > + if (!devfreq->scaling_max_freq) { > mutex_unlock(&devfreq->lock); > err = -EINVAL; > goto err_dev; > } > - devfreq->scaling_max_freq = devfreq->max_freq; > + devfreq->max_freq = devfreq->scaling_max_freq; > > dev_set_name(&devfreq->dev, "devfreq%d", > atomic_inc_return(&devfreq_no)); > I already replied with my Reviewed-by tag. You are missing my tag. Again, Reviewed-by: Chanwoo Choi -- Best Regards, Chanwoo Choi Samsung Electronics