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: 10241243 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DBAD360208 for ; Mon, 26 Feb 2018 05:09:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CD2B3292DF for ; Mon, 26 Feb 2018 05:09:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C2453297C3; Mon, 26 Feb 2018 05:09:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 629D2292DF for ; Mon, 26 Feb 2018 05:09:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751788AbeBZFJs (ORCPT ); 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-Google-Smtp-Source: AG47ELv36lEShC9c0I/VktMYoKWQPq5/wyrCJKyNVYq5kTt7su+M7QQj/7vJhmYWyMcXbyVkKKs5cQ== 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 X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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 */