From patchwork Mon Feb 26 05:08:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 129533 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp3230266lja; Sun, 25 Feb 2018 21:09:49 -0800 (PST) X-Google-Smtp-Source: AH8x2278HSEAWm0sQryp1G7xb/GIQ+n+3QhqbydwHjH0Rp1r2yt/P7yaN2NBBFsORxHAiPkJbSlA X-Received: by 2002:a17:902:9343:: with SMTP id g3-v6mr9589899plp.319.1519621789694; Sun, 25 Feb 2018 21:09:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519621789; cv=none; d=google.com; s=arc-20160816; b=cDH5sUQQQOnv97mUbH7+Rrg4fi4miuo7OQIn9r3sfkmFv9EhfLOrXYOMAX1aMZjhl3 7G66CGiu5ZuN/gYXHo0/ZjFTcy18zj6lmZLU8PlPXmNrUnojXW34XLwHSnSDD/7pT9mN pGPE1ze9ox8sjVfZFWX0MC3+J/+LyBUxAMMhoRxwxtaDSPg32bS40aJXaCtkcQYdxGpF spjwBJTS3NVUU1Jg56K1eMNqPOgTQ5H6VaQnfFpHjuwYAUrT0G/G2u0jKn5nIfZfoULn eMxDmQZvo3hxuLVpl+e/IlBpy13VbPseBhh5e/sC+t/4K8B/7jjY5rpYfWxeLa+Ss1w+ ySxw== 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=qcXKQcD1fgPfs5hTTi7lJwbH+0qqoIEafaA77+7reyM=; b=WoKFozBxCNwthsceT9U7XTOlxSHKME8CG5QMlYBKh9gMCDWbVmTjQejyDL0WoEmhdY robDYGazIK/YgNAx3lPrty8HQSI3nXe+7sj0bJvtO0cKuyeLsPAi1vMXXNGJ3eXZYWup 2AL01qBP3ngsSKYWDu6JP9D7heyIPb9F9DDROMIlC39Ual6cvvwmIi6i7eJQj0nrIojj L9ThNR+lz+Lcs3nEtJxuVOZZc8sm4h2iii+i07yPaTPFY4UUhQ7z4/Yckx00tts79wZN p5IxS+g9YU/3QiTtDnnFgqdrJHTP1k9qqRDQuVFb86FtkIwogdqYGpGPcmpsUjojxmSa ps6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WYPzS7Ka; 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 h32-v6si6199354pld.217.2018.02.25.21.09.49; Sun, 25 Feb 2018 21:09:49 -0800 (PST) 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=WYPzS7Ka; 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 S1751788AbeBZFJs (ORCPT + 11 others); Mon, 26 Feb 2018 00:09:48 -0500 Received: from mail-pl0-f67.google.com ([209.85.160.67]:46895 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750882AbeBZFJs (ORCPT ); Mon, 26 Feb 2018 00:09:48 -0500 Received: by mail-pl0-f67.google.com with SMTP id x19so8654617plr.13 for ; Sun, 25 Feb 2018 21:09:47 -0800 (PST) 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=qcXKQcD1fgPfs5hTTi7lJwbH+0qqoIEafaA77+7reyM=; b=WYPzS7Ka4gMkKFdmFLaLUqCDhcqjU93fVlQgHQOQZJ24VnjMcMuPP7KIH9ddRfNFbe EgArx1BmVR4FhMNQyKS+Emwmg+jNybFJh3uWngOico4AcZbz4X/646dYWy92/J7bOtcH DgL8E+G96p9LqQMf5QQM20UrzsnmAJ+DsUesw= 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=qcXKQcD1fgPfs5hTTi7lJwbH+0qqoIEafaA77+7reyM=; b=b/tmQIW0e62EgO4VRViD4aHbr3QMU42kvbXeqCQ2rUND9PhxLFllKYLcKZ/lSv13ji qWU1CwZGYb+7JHpQ/y2fwGyQbTOuh2O0Xj51NXde1g82mwT+H4LCrNeADnCiVoLwaCyU WzZh2oELLmAroWn4/d/FcAWNo4kJAgl0Mu9NNuBEhypfYyHAVkbrMFbFOXBn5Eb6Hvlx ylvbWFbvSoTylZaXIjv2iKD6k+4BHZ8SSUQZQTIsTpuVmMgWcPPmo/5hWAdQHIzW486+ +/6ewCo31rIvbI+JOTSKFyw0Arvi6TaA7+oTDLZmXkenb8ZWDsWStRM6vYl8XbeiINz3 tO0A== X-Gm-Message-State: APf1xPAhYjCsDWB5RiJW7KU2TN08HSsfl8b+HRyNgy3n9b/ItDaj5+We B4qhrbqpHaFb9wQYmeewb5knsA== X-Received: by 2002:a17:902:bb06:: with SMTP id l6-v6mr5292997pls.394.1519621787591; Sun, 25 Feb 2018 21:09:47 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id w3sm17609553pfw.30.2018.02.25.21.09.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:09:47 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot Subject: [PATCH 07/27] cpufreq: cpufreq-dt: Don't validate the frequency table twice Date: Mon, 26 Feb 2018 10:38:50 +0530 Message-Id: <68d899334334fe62034462cdfacc0328f4c7adef.1519620578.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 cpufreq-dt driver. Signed-off-by: Viresh Kumar --- drivers/cpufreq/cpufreq-dt.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) -- 2.15.0.194.g9af6a3dea062 diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c index de3d104c25d7..190ea0dccb79 100644 --- a/drivers/cpufreq/cpufreq-dt.c +++ b/drivers/cpufreq/cpufreq-dt.c @@ -258,16 +258,10 @@ static int cpufreq_init(struct cpufreq_policy *policy) priv->cpu_dev = cpu_dev; policy->driver_data = priv; policy->clk = cpu_clk; + policy->freq_table = freq_table; policy->suspend_freq = dev_pm_opp_get_suspend_opp_freq(cpu_dev) / 1000; - 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; - } - /* Support turbo/boost mode */ if (policy_has_boost_freq(policy)) { /* This gets disabled by core on driver unregister */