From patchwork Tue Apr 3 10:07:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 132709 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp3607194ljb; Tue, 3 Apr 2018 03:07:53 -0700 (PDT) X-Google-Smtp-Source: AIpwx49vmCy2y6Iwnxd4dIlMKUBhOXX61iFxn2hozqF2WefM9B7z5mq3KPQZAiqPLqiwNnf6/Dw6 X-Received: by 2002:a17:902:82cb:: with SMTP id u11-v6mr13411574plz.369.1522750073001; Tue, 03 Apr 2018 03:07:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522750072; cv=none; d=google.com; s=arc-20160816; b=xME4+CuKPrwVy8foWhwvPhnb7sN/dXrv45ai6CpOTITu07bMLNqXO6na0qUwxbX8Nw 47dBj25nb4a/BFM/75LrIBSUEjkGhb+eq4+gVpMs35oEFXlctgjywM04cCryRZmefgtx yQyLr8X9WMz1EcK0gSHXwbT2I+H7E3IgphhO9DoSYZEijiXNSDrM5XeG6yixve8zU5Ia TPuBjNVj/GKDVU1QvKM7bePsvgBn4na68B2apVHrmgYc3uBf8nHA3d+e6T/p8FrvE/xF VKUSLCjht9mT7HHOt1OqkSFMbShO7KhmKcgAmycaUYr3RyfWIY0od05hqYgZwSPLsYBs t6og== 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:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=314WJSg4r3Hnm1ZhD2Iq+b6Brhom7hfuJV9r0IRRT+A=; b=P5UiZ0mjMe2JTYVRZdwNJ2N5Dc/5lX1SNXdl2W1ion8JArGiAsgAag5HQGjrJ1QFgB 3Ig0Xuzy5WVrNswxPmDvdBCN9K4DLkljqK2yoyNDRPZi1PAQI+O7unyMTAGa5VpHG1oM ARwUSg1SRQaiObC6LboDHtF5IzakR6QZVQB16Ajsntp//5sDGu1vcYR7n6VSJVzQFpHs tjBBlM9CTXHqtykZumpfML+JeDu2LcxUAzh/uw3iTQux52oFICjyCm4pQwrp0nsqGNLc ldETGTUiJ0s7m2uj2NWNtyNw71tg6CG7QDniyK8hIItlq/+fXHcyR++71l7rdgzD1HmE 4Nrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=k1/TyPg2; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 u6-v6si185259pld.628.2018.04.03.03.07.52; Tue, 03 Apr 2018 03:07:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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=k1/TyPg2; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S1755246AbeDCKHv (ORCPT + 11 others); Tue, 3 Apr 2018 06:07:51 -0400 Received: from mail-pl0-f68.google.com ([209.85.160.68]:43497 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755162AbeDCKHt (ORCPT ); Tue, 3 Apr 2018 06:07:49 -0400 Received: by mail-pl0-f68.google.com with SMTP id c21-v6so4533313plz.10 for ; Tue, 03 Apr 2018 03:07:49 -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 :in-reply-to:references; bh=314WJSg4r3Hnm1ZhD2Iq+b6Brhom7hfuJV9r0IRRT+A=; b=k1/TyPg2deJk/g1yZVcpcseckTqNmysmHvOcNHzKQfO9TK17oDRvrvk9cQC6UtHbpE e5Rs00k5w/+3GHm1btL+DuZW6FWCD9HpimunO8rXyJxG9k88yiBpBrLnSBk4G0doAp4I pdBKcdazkR3ufRSzlVAODPHSjrIpjrz7YV75U= 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:in-reply-to:references; bh=314WJSg4r3Hnm1ZhD2Iq+b6Brhom7hfuJV9r0IRRT+A=; b=OcvgL8HxxCEvsGFTtki3fvc3uIitpmc0co7PESBz6tF0Dd3NfWlPHYWvzqLiOM86jF yJAlDqI894Pcf+9FqkV7NkA4CwCriOY8Y7GJs+Ae6TCQQO+Zei3DGmW6IfYX44FQKznc 6hDLCysCzi5Rie/Ksz1/8t9t5kPc24dZX25MWoRmjNfUOlOJfxiIQeT6au5WkMGVFYz3 kmwcTc0lvVfIXpM1FHsc6vtE0rqAmcJEYzrgdjsEDU639r5Y6lbzGCtYoXD2b3Wkpd5W +dnEui+RISnfdfSwq0fpE7CyJ6PdCI/NjdzrMYg1FaRrXjQRTM+jiIrpUt7iom7IHpu6 70sA== X-Gm-Message-State: AElRT7GmT5UIzT3BgEFD3K+KcPYScqPEcRPdA4RkZM/Ae2gUUiKahQsI BxU42g6Elh4Gf1Pip3YlTIzxJg== X-Received: by 10.99.122.22 with SMTP id v22mr8367929pgc.300.1522750068793; Tue, 03 Apr 2018 03:07:48 -0700 (PDT) Received: from localhost ([122.171.228.188]) by smtp.gmail.com with ESMTPSA id h21sm4082191pgv.57.2018.04.03.03.07.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Apr 2018 03:07:48 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , Sudeep Holla Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , linux-arm-kernel@lists.infradead.org Subject: [PATCH V2 1/2] cpufreq: scmi: Don't validate the frequency table twice Date: Tue, 3 Apr 2018 15:37:38 +0530 Message-Id: <442ecfd0a5bddf32c912c449b072d8a0139318fc.1522749887.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from scmi driver. Signed-off-by: Viresh Kumar --- drivers/cpufreq/scmi-cpufreq.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) -- 2.15.0.194.g9af6a3dea062 Acked-by: Sudeep Holla diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c index 959a1dbe3835..b4dbc77459b6 100644 --- a/drivers/cpufreq/scmi-cpufreq.c +++ b/drivers/cpufreq/scmi-cpufreq.c @@ -159,13 +159,7 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy) priv->domain_id = handle->perf_ops->device_domain_id(cpu_dev); policy->driver_data = priv; - - ret = cpufreq_table_validate_and_show(policy, freq_table); - if (ret) { - dev_err(cpu_dev, "%s: invalid frequency table: %d\n", __func__, - ret); - goto out_free_cpufreq_table; - } + policy->freq_table = freq_table; /* SCMI allows DVFS request for any domain from any CPU */ policy->dvfs_possible_from_any_cpu = true; @@ -179,8 +173,6 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy) policy->fast_switch_possible = true; return 0; -out_free_cpufreq_table: - dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table); out_free_priv: kfree(priv); out_free_opp: