From patchwork Thu Apr 25 09:04:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 162832 Delivered-To: patches@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp1671699jan; Thu, 25 Apr 2019 02:04:32 -0700 (PDT) X-Received: by 2002:a05:6512:20d:: with SMTP id a13mr10369799lfo.42.1556183072536; Thu, 25 Apr 2019 02:04:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556183072; cv=none; d=google.com; s=arc-20160816; b=zv6iLf6CTTYXxv8fRht8aXA7U9+so9AezKa5JbbVh+2yZC6doT/JFKqnj5S5E51e0R n0ALxUBY0TDVpBDWJ+23LWZmORcf0hXdmcNeF4GPKfhfpMLkUbiJSMNdZ0yJo2vF1S4m psrQDqhRG21WiFsPmFCeNBb/Rx0zWrea25GEs1GX0oaqxOxzBmGXCOnKtWKuvli3c2IB xM8Xq6v9WHefyUF+GwqEPEr5DWLnuzTxNqUadv9427LeCLNBSI+E3cZ4nWIPRFga9/MK rjE9R+LssV/1Ey6p5NtaGoIO7TZ/gFqyH1tYL7BsIDR6nHONvPRpI2QRrk/V7rjCg9q2 QFsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wzmNVY0MlNQoNKUiuFMitPMY1YZ/UR3X4yK7u+qVxVk=; b=THjDEbg32vxwpJN8/QpPuVtLDW9g+qpzFgWMz4GzVoxmwD/en3rLEsMQdWOS5ttEEr B4ElNe/PZA9v18C3ozLHgBkKZyGNPVXu4a9w+3LKABkTxfJXBcTQFOHPhoqshrCf2xmR esnzOXQ5Osw6cOzQ/UoUyY+Rnjj11tvoixKydifMwDtDkh+jJIXL6KFSkLwCRB8jBm+S V/XcJndLL79H4/tDbit7ovtink8zuix6oB54Hg25+z8W6jyKPo0xdAdDCFK+D/kupw9a 32Oi5IXBoK7ksavw9XlqZjhgEVc6rW5ofJvhsLcYEGQdSsSo6zHWsvYvsRxuaRpHiPM5 wOkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=A2KTRy+U; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id j28sor5883508lfk.0.2019.04.25.02.04.32 for (Google Transport Security); Thu, 25 Apr 2019 02:04:32 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=A2KTRy+U; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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=wzmNVY0MlNQoNKUiuFMitPMY1YZ/UR3X4yK7u+qVxVk=; b=A2KTRy+UTjfFd6veJikGx+mAUNWRwrabYPXJSq0/v4iJK3R2oiqxGAkZNOydnxTg9w tw1lnJBBGtW5bXKza56jkpnosPgGqY0VRU7lYp+Gm7PWF0gkJ3s//k5r+seLl9U3FOp7 W4n3veKjXDH+OwuSS8DNc41UC42eOdfT2EoWJA39ky+yMOe1atsVWy+yT6Nx5fC3ZcbM RZNY7K2SSnY8kzITh0pniHbFQvxp5wYL6xcds5xDhQtAol+LWvaRW3RNcx2lIkpNdY6K IwWLXk+4yIBe4yKQmqGbrYq962cxUxnYSUNbkoGY9kOcyMPqnlUTVQwCSQkPDF6+KYYf c2Dg== 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=wzmNVY0MlNQoNKUiuFMitPMY1YZ/UR3X4yK7u+qVxVk=; b=tVIvcElEvvqyG5vAMswVSon+ovDi4gXbZbVzTLnOQD1reUSh1HIrcmEzoE08pkRpvq 6lfbsiXrlfgueJlz9bdV6As3ujl1EXdXS9VjChX0AXhKxbP4jrfS3nRmzUzOBHDfYrfQ tfZYKJp0JENvzRjc/BknnoJNQG1OMMGSHHAbkmNEixKU0X0L36wOYlrMNCcnGJ/8DQYw jmeIkJUS2nQXwHrP3Wx/dw+7PBBLzsEgn+LOwFZnvAhMadFl0hqAsOhPp5SvHjYM5dX9 DvDgcxywTXEkOxWtmLqm+gA0sq95epKd7etVTl638mJJiSF3XteEirGOszCRiYzrPPhC sTtw== X-Gm-Message-State: APjAAAV3OiEgYzNGCEZgcBMHCxbmbHALv8Wkh2fEo1JdgmvzJ+cIy1bL wrvyTVLJ6gQzd5Pb9AUxobZQr+KR X-Google-Smtp-Source: APXvYqxOExGs7TchsFt3Iosql2c44CBBoUo1AKafGwYXzlB0y9Oui8WYRfkMv0ESWoUQPAPCVag72A== X-Received: by 2002:a19:f50e:: with SMTP id j14mr19043514lfb.11.1556183072109; Thu, 25 Apr 2019 02:04:32 -0700 (PDT) Return-Path: Received: from localhost.localdomain (h-158-174-22-210.NA.cust.bahnhof.se. [158.174.22.210]) by smtp.gmail.com with ESMTPSA id v26sm4517353lja.60.2019.04.25.02.04.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Apr 2019 02:04:31 -0700 (PDT) From: Ulf Hansson To: "Rafael J . Wysocki" , linux-pm@vger.kernel.org Cc: Ulf Hansson , Daniel Lezcano , "Raju P . L . S . S . S . N" , Stephen Boyd , Tony Lindgren , Kevin Hilman , Lina Iyer , Rajendra Nayak , Viresh Kumar , Niklas Cassel , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/4] PM / Domains: Drop unused in-parameter to some genpd functions Date: Thu, 25 Apr 2019 11:04:11 +0200 Message-Id: <20190425090413.10700-3-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190425090413.10700-1-ulf.hansson@linaro.org> References: <20190425090413.10700-1-ulf.hansson@linaro.org> Both genpd_alloc_dev_data() and genpd_add_device(), whom are internal genpd functions, allows a struct gpd_timing_data *td to be passed as an in-parameter. However, as NULL is always passed, let's just drop the in-parameter altogether. Signed-off-by: Ulf Hansson --- drivers/base/power/domain.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) -- 2.17.1 Acked-by: Viresh Kumar diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index 8aca1c9b4406..93298b7db408 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -1396,8 +1396,7 @@ EXPORT_SYMBOL_GPL(pm_genpd_syscore_poweron); #endif /* CONFIG_PM_SLEEP */ -static struct generic_pm_domain_data *genpd_alloc_dev_data(struct device *dev, - struct gpd_timing_data *td) +static struct generic_pm_domain_data *genpd_alloc_dev_data(struct device *dev) { struct generic_pm_domain_data *gpd_data; int ret; @@ -1412,9 +1411,6 @@ static struct generic_pm_domain_data *genpd_alloc_dev_data(struct device *dev, goto err_put; } - if (td) - gpd_data->td = *td; - gpd_data->base.dev = dev; gpd_data->td.constraint_changed = true; gpd_data->td.effective_constraint_ns = PM_QOS_RESUME_LATENCY_NO_CONSTRAINT_NS; @@ -1504,8 +1500,7 @@ static void genpd_clear_cpumask(struct generic_pm_domain *genpd, genpd_update_cpumask(genpd, dev, false); } -static int genpd_add_device(struct generic_pm_domain *genpd, struct device *dev, - struct gpd_timing_data *td) +static int genpd_add_device(struct generic_pm_domain *genpd, struct device *dev) { struct generic_pm_domain_data *gpd_data; int ret; @@ -1515,7 +1510,7 @@ static int genpd_add_device(struct generic_pm_domain *genpd, struct device *dev, if (IS_ERR_OR_NULL(genpd) || IS_ERR_OR_NULL(dev)) return -EINVAL; - gpd_data = genpd_alloc_dev_data(dev, td); + gpd_data = genpd_alloc_dev_data(dev); if (IS_ERR(gpd_data)) return PTR_ERR(gpd_data); @@ -1553,7 +1548,7 @@ int pm_genpd_add_device(struct generic_pm_domain *genpd, struct device *dev) int ret; mutex_lock(&gpd_list_lock); - ret = genpd_add_device(genpd, dev, NULL); + ret = genpd_add_device(genpd, dev); mutex_unlock(&gpd_list_lock); return ret; @@ -2259,7 +2254,7 @@ int of_genpd_add_device(struct of_phandle_args *genpdspec, struct device *dev) goto out; } - ret = genpd_add_device(genpd, dev, NULL); + ret = genpd_add_device(genpd, dev); out: mutex_unlock(&gpd_list_lock); @@ -2429,7 +2424,7 @@ static int __genpd_dev_pm_attach(struct device *dev, struct device *base_dev, dev_dbg(dev, "adding to PM domain %s\n", pd->name); - ret = genpd_add_device(pd, dev, NULL); + ret = genpd_add_device(pd, dev); mutex_unlock(&gpd_list_lock); if (ret < 0) {