Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3663101imm; Tue, 29 May 2018 11:07:19 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpwQWrzhpf5LBg4OmmaWCKY19fuct3ULJgHTXuYpf6Oks79Xiw0zSiqI71lO+UZJWcIG5+r X-Received: by 2002:a17:902:7146:: with SMTP id u6-v6mr18199994plm.289.1527617239487; Tue, 29 May 2018 11:07:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527617239; cv=none; d=google.com; s=arc-20160816; b=PY7GLyaCYlrS9Yw+WlI+AqFu/Q6tyLqzoacJzml1aZBFKo+rQnyFyAXkeEbkt2+lgc twfIbaullR4YkRcSLYBNbCcf8eeMqSTg12QZGgY/oyKqWFvYbg2waXiyUP7MkMDSKx8Z 367rhvhfzceA9Gt4CzO2UcOqGvV6/LBdU7A5ohkJP5/Ak8Csg4dxc86q+TOarJf+MGb/ m7bK45xEvcllcnFLlqNVsn3naBOUG0kd6h7bJ4oMFqSnQibsxhxs1oQ2RSd+r25ZHFUj iywDHHvgPe+23yuouDvS7Q79Eood3D92ywq7aQzA+wd5wtEtck2fnJzPvSt/F1iXFoID 9d2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=GY4NHVKGkO9nFPGnCSN3zkzhZxy/EyQKDtPBVcvsFPo=; b=BY0Mvx/JMfmPB4Yjb+ppcMmDth+60Gwb9wcxSneaW/P/dB/PF4KaOXf5wWz41fjZ4b McArHeYJmM8Io15nBlm6+4HQTF9kdgnvDzBObhr63c5K93uM72TopCfZuoVTaZY+fxBX luN2jlNSlAunOO6AQFDnpL0FFKJuK0EbMugCzBCOWTs7WoyAhqKNZgSvvPIp10sSwsKp 5m9Lz9HZgUiWo6W2ZQR4YRxNiKBSGIEB87nm7GsVE+YHO9fDZopVRaz0X17hfZeKc4tv iY2n28hsuhRoxSntuw8CXbsZrJayMTef7enyLsd3nvVn8/AQneT8ix94ZRdqM6V/M6LO Nr6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Ht+wR8t+; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p1-v6si22398408plo.363.2018.05.29.11.07.05; Tue, 29 May 2018 11:07:19 -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=@chromium.org header.s=google header.b=Ht+wR8t+; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965759AbeE2SGR (ORCPT + 99 others); Tue, 29 May 2018 14:06:17 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:35515 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936888AbeE2SGK (ORCPT ); Tue, 29 May 2018 14:06:10 -0400 Received: by mail-pf0-f196.google.com with SMTP id x9-v6so7662349pfm.2 for ; Tue, 29 May 2018 11:06:10 -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:content-transfer-encoding:in-reply-to :user-agent; bh=GY4NHVKGkO9nFPGnCSN3zkzhZxy/EyQKDtPBVcvsFPo=; b=Ht+wR8t+qwVC8aRz3Px8heQpVagSzGyk5T1ZruIfSbeouAxCIQsAe6m24wCLW9PNOm 3yuFPFPL3OwGpufM6BCn1rUAaxmNGh44B9zZdS7KwySgKcb/oLzp+lAy2rgASjnPSF22 6yqq13Qr6HEELU/IF88pA/I92+xgMM/K5jPII= 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:content-transfer-encoding :in-reply-to:user-agent; bh=GY4NHVKGkO9nFPGnCSN3zkzhZxy/EyQKDtPBVcvsFPo=; b=DIt75CHtiArGC7Xmy0YgvlpSRmUFj5uSaxX3Wv/34vf6NKfWRXJF0UARv0kXT1QMPP SIBob/yNbgWIbPNFgYroy4Ds6Ip+54HEcElkYRaTTbGNRVa2H4C/Qh6vLcIQMmyeWgk/ YGht4UDxxY3yTz0QJ/qkn1e+XmjD7j7G+UrCagd247YFuILpGbq+GH905KeDR1yRnTNj a4Kncygl6oZ57TIHZ0Vh/wWAdtPyPsnNF8kIRLD6FwS+RhHYH5E1inid/f5R57Rjlp/q L2b1LS17ZVFoT89uGwWtBqR01RH5F7wga0vL+mJud4tck/8ftlPBaBRsUb+YrWtZCHGG MuYA== X-Gm-Message-State: ALKqPwexXILXytAX3xjzv3zJLlpGHXY8UUhjtCuP0tYwi1JkQBDQx4Ro J0rWC1an2/PM8oXcPbwjAaiqZw== X-Received: by 2002:a62:2043:: with SMTP id g64-v6mr18389680pfg.12.1527617169815; Tue, 29 May 2018 11:06:09 -0700 (PDT) Received: from localhost ([2620:0:1000:1501:8e2d:4727:1211:622]) by smtp.gmail.com with ESMTPSA id k84-v6sm23300062pfh.110.2018.05.29.11.06.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 29 May 2018 11:06:09 -0700 (PDT) Date: Tue, 29 May 2018 11:06:08 -0700 From: Matthias Kaehlcke To: Chanwoo Choi Cc: MyungJoo Ham , 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 Message-ID: <20180529180608.GF168650@google.com> References: <20180525203043.249193-1-mka@chromium.org> <20180525203043.249193-2-mka@chromium.org> <5B0B9319.9060709@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5B0B9319.9060709@samsung.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 28, 2018 at 02:26:49PM +0900, Chanwoo Choi wrote: > 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 Sorry, forgot to add the tag after creating the series. I now added it to my local tree.