From patchwork Wed Jun 20 06:15:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 139283 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp384459lji; Tue, 19 Jun 2018 23:15:51 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKVzNrMXpDNb8PZaR1htByIsz3Wi2pvCU3vR8WHaBBV5PLW5gSTT+SvItNBHExnF9brEXZ5 X-Received: by 2002:a63:4346:: with SMTP id q67-v6mr17426886pga.328.1529475351123; Tue, 19 Jun 2018 23:15:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529475351; cv=none; d=google.com; s=arc-20160816; b=G838NrQEB12NdtVOZ50/LJXMz9/yoHjquDSlPJM8jvo4xu9/9y8+73IzDHzGJwwIRE xUJRjMb5MR9NbFCnICByXzvRrL9wmbpZMeKW5b+/2Hzx6r+rJsR/z1tXGB1St22/XYXH YwGDoNbFWGfo+8OL36SWpXnQ66PqYX/yE3QQCctpwgGRmNr6l41+idQYm8d7gJOH4kI8 /8EWDD0TJZJfkSjDaU4t3lEeeo2BZTrtgN9AiW5NaETkNO0BHZQEbVktTaIFtUfwl6Rr 5+7OsPh9WY1+ol1l1eFi78XLdF099tXVOSBfrJ1GOLzZASLlrlb6+NIl66ns+FGg1ZV7 +POA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=sz6tTIZvvI590FAOm6WLnM84e5bFQiD4UNljdabVAC4=; b=Ymb2eHTRbISvuXG4ytb0a9ywDc8oScsauWhPDL07jpPPu7K+pQ8EtMmc9qn67qThPr wIIsn3awyzElPRR0xsw4rCpYPDMSOzZdSHLbmDsgyi1LQ3a2UoffdAqoTjIpvNrjbUn2 E7bvn4P2oFstTwN4Y0YYU+yGU63fW74BuTaRYftplkxG7PDoZ7hjt/xutEkdSJMUpj1b 92LsZLG4ASQEabLiBfxyVqSOtbYsET1kwaZVbNoiFnKoM8mwNIeu/vfHRJGPJxc3zusu myHUqi0hwnEt6WIsyV0luIs8W1loD5qsm0Mh7Qbe3EZ/yH1GzYA28tzCeCd62rpNxX04 MS3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="N8/mzRnK"; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u190-v6si1655753pfb.325.2018.06.19.23.15.50; Tue, 19 Jun 2018 23:15:51 -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=@linaro.org header.s=google header.b="N8/mzRnK"; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754147AbeFTGPt (ORCPT + 30 others); Wed, 20 Jun 2018 02:15:49 -0400 Received: from mail-pl0-f68.google.com ([209.85.160.68]:47081 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752121AbeFTGPn (ORCPT ); Wed, 20 Jun 2018 02:15:43 -0400 Received: by mail-pl0-f68.google.com with SMTP id 30-v6so1155827pld.13 for ; Tue, 19 Jun 2018 23:15:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=sz6tTIZvvI590FAOm6WLnM84e5bFQiD4UNljdabVAC4=; b=N8/mzRnKOiEEEjPRY0BkxtMP0Vi+U9I9xCxk8PH2AwXwizKCZ47TXr4DPERdt9mPvj CcQF4L7kP6L9v+9rL461IvgVJ7tbe+ahCp+d5qoPj6wSTlCStzIcm5v6r98/kmMpXo2W 7jnp7UnoWA3S2jwPWDv+Usumql53+z2cXMAKQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=sz6tTIZvvI590FAOm6WLnM84e5bFQiD4UNljdabVAC4=; b=ssDWMAmN+UXZN+pO50//BoIWb/9i3goqqQoFHQ6HomoN5boQ9mOht6+2N3NcCw9mLX dn5bZ0nnYSIFR+Hd01RbeCUcy4iq6Vgzbzr3vnf0WL5IJ2hcC3cHiOGcCGqXZUL9VHK0 xmcgLOdud6b2QSmxmqUQxyG4NDeU1YHsbXFvXCCZdm/WlImgc1yKn7maErwBF2ofqPuD GAZyiDgXXg2TdzTRk1yFgoUsUvHuIGkKxg2dZ758IvQXofiLasfHYvPto9l03IllML91 LnpQ9J253Vob8jDIUP1fqfwMG+6Ubo/nSC8Rsb+mjPpYXSpdo7MoR3Z+F4LpQeQPq58a lQ9A== X-Gm-Message-State: APt69E2U8ccuVUXdfH8ToNOGmVmfLupIFBRYtNAtzWpPkf9pDPvEhnyn YzSxO/JsfvtJLZ/siNw+7FvXfg== X-Received: by 2002:a17:902:b40f:: with SMTP id x15-v6mr22365817plr.270.1529475343199; Tue, 19 Jun 2018 23:15:43 -0700 (PDT) Received: from localhost ([122.171.103.96]) by smtp.gmail.com with ESMTPSA id z82-v6sm2564663pfk.30.2018.06.19.23.15.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Jun 2018 23:15:41 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , Kevin Hilman , Ulf Hansson , Pavel Machek , Len Brown Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , Rajendra Nayak , linux-kernel@vger.kernel.org Subject: [PATCH V2 2/2] PM / Domains: Rename opp_node to np Date: Wed, 20 Jun 2018 11:45:37 +0530 Message-Id: <7511c9837569aec34c56e0a40364f2f3c16563b6.1529475153.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.18.0.rc1.242.g61856ae69a2c In-Reply-To: <3d3687c030535189885d84c57dbffb034c4461c2.1528953706.git.viresh.kumar@linaro.org> References: <3d3687c030535189885d84c57dbffb034c4461c2.1528953706.git.viresh.kumar@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The DT node passed here isn't necessarily an OPP node, as this routine can also be used for cases where the "required-opps" property is present directly in the device's node. Rename it. This also removes a stale comment. Acked-by: Ulf Hansson Signed-off-by: Viresh Kumar --- V2: - Updated variable name in header file as well. - Because it was a very small change, I added Ulf's Ack as well. drivers/base/power/domain.c | 7 +++---- include/linux/pm_domain.h | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) -- 2.18.0.rc1.242.g61856ae69a2c diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index 4925af5c4cf0..c298de8a8308 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -2487,10 +2487,9 @@ EXPORT_SYMBOL_GPL(of_genpd_parse_idle_states); * power domain corresponding to a DT node's "required-opps" property. * * @dev: Device for which the performance-state needs to be found. - * @opp_node: DT node where the "required-opps" property is present. This can be + * @np: DT node where the "required-opps" property is present. This can be * the device node itself (if it doesn't have an OPP table) or a node * within the OPP table of a device (if device has an OPP table). - * @state: Pointer to return performance state. * * Returns performance state corresponding to the "required-opps" property of * a DT node. This calls platform specific genpd->opp_to_performance_state() @@ -2499,7 +2498,7 @@ EXPORT_SYMBOL_GPL(of_genpd_parse_idle_states); * Returns performance state on success and 0 on failure. */ unsigned int of_genpd_opp_to_performance_state(struct device *dev, - struct device_node *opp_node) + struct device_node *np) { struct generic_pm_domain *genpd; struct dev_pm_opp *opp; @@ -2514,7 +2513,7 @@ unsigned int of_genpd_opp_to_performance_state(struct device *dev, genpd_lock(genpd); - opp = of_dev_pm_opp_find_required_opp(&genpd->dev, opp_node); + opp = of_dev_pm_opp_find_required_opp(&genpd->dev, np); if (IS_ERR(opp)) { dev_err(dev, "Failed to find required OPP: %ld\n", PTR_ERR(opp)); diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h index 9206a4fef9ac..e1d18ce3a310 100644 --- a/include/linux/pm_domain.h +++ b/include/linux/pm_domain.h @@ -234,7 +234,7 @@ struct generic_pm_domain *of_genpd_remove_last(struct device_node *np); int of_genpd_parse_idle_states(struct device_node *dn, struct genpd_power_state **states, int *n); unsigned int of_genpd_opp_to_performance_state(struct device *dev, - struct device_node *opp_node); + struct device_node *np); int genpd_dev_pm_attach(struct device *dev); struct device *genpd_dev_pm_attach_by_id(struct device *dev, @@ -274,7 +274,7 @@ static inline int of_genpd_parse_idle_states(struct device_node *dn, static inline unsigned int of_genpd_opp_to_performance_state(struct device *dev, - struct device_node *opp_node) + struct device_node *np) { return -ENODEV; }