From patchwork Mon Feb 26 05:08:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 10241241 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 018CF605F3 for ; Mon, 26 Feb 2018 05:09:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E80D0292DF for ; Mon, 26 Feb 2018 05:09:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DC9EE297C3; Mon, 26 Feb 2018 05:09:46 +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 8375F297C2 for ; Mon, 26 Feb 2018 05:09:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751671AbeBZFJp (ORCPT ); Mon, 26 Feb 2018 00:09:45 -0500 Received: from mail-pl0-f66.google.com ([209.85.160.66]:42127 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750876AbeBZFJp (ORCPT ); Mon, 26 Feb 2018 00:09:45 -0500 Received: by mail-pl0-f66.google.com with SMTP id 31so8648973ple.9 for ; Sun, 25 Feb 2018 21:09:45 -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=mbM/nQwKbDGCgT5aGrfXK+B80WlDzF6HIV3v2fYFi8Q=; b=I9gbsi9zkHiGgj/HFP0AmBWJKTpxFGBvkFgdZTLjKEX2M/dQZgF7ysYfXUvhz5Pak2 YeAUcQOq0c29c64amrFQDL5MlnIXMOS186d2EkF+eFi1Dfhf8OlJGwVCaQEUyPc5VbmO 9bjpDXcHIhUjwtmnDjAi00avAzaQN88C+Zji4= 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=mbM/nQwKbDGCgT5aGrfXK+B80WlDzF6HIV3v2fYFi8Q=; b=K2ztJFlwYbtKMMmQy/UwFHZqCa5R2VAA0cA84hEFqa3KejRvT0jsh82HMojx6irpyg FwLTvmsRHWzEEicQYGTQzcX600wTgGpoxaEkz6rP2OkHo5rUaeIDbBF3r4Z97zy4Tr7P XnYGygYizXyk5yOGCU9F3Ouk9PBQpkxgEUeLj2upIT2BisdYRvG5VXExHed+xDWmzQM+ oOVfYll81UV0qf/YTgI4lEuDvcD7jDqj51eIo/DsE7mdOrsscaRUBeytKh6Sx0m7DZsm N36IkXaF6XpgtIPo6aMmZVB3NJAAHkmEaljvw9W15JpcgLqkS4HOf8MiTvA7EQKX9W6A KS/w== X-Gm-Message-State: APf1xPAVliP7ueK3RGZQDNHp18t+3IZE4jIKyrZrAiPwpGqJl0TLxhYF PikLib3JOt8Uu2GPRelAAAUAqg== X-Google-Smtp-Source: AH8x225DQBTtc/Ss1ENCM2UdpWKj2U3BXOOYstKu2c1dgqfdM5a+PR2qymZWYkc2E/bdGE5k/BHK8Q== X-Received: by 2002:a17:902:12e:: with SMTP id 43-v6mr9435428plb.77.1519621784945; Sun, 25 Feb 2018 21:09:44 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id 14sm16389077pfi.132.2018.02.25.21.09.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:09:44 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki , Markus Mayer , bcm-kernel-feedback-list@broadcom.com, Brian Norris , Gregory Fong , Florian Fainelli Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , linux-arm-kernel@lists.infradead.org Subject: [PATCH 06/27] cpufreq: brcmstb: Don't validate the frequency table twice Date: Mon, 26 Feb 2018 10:38:49 +0530 Message-Id: <7d2bc4de102c81503c30a64503179c4ccebe6287.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 brcmstb driver. Signed-off-by: Viresh Kumar --- drivers/cpufreq/brcmstb-avs-cpufreq.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/cpufreq/brcmstb-avs-cpufreq.c b/drivers/cpufreq/brcmstb-avs-cpufreq.c index 7281a2c19c36..6cdac1aaf23c 100644 --- a/drivers/cpufreq/brcmstb-avs-cpufreq.c +++ b/drivers/cpufreq/brcmstb-avs-cpufreq.c @@ -902,11 +902,7 @@ static int brcm_avs_cpufreq_init(struct cpufreq_policy *policy) return ret; } - ret = cpufreq_table_validate_and_show(policy, freq_table); - if (ret) { - dev_err(dev, "invalid frequency table: %d\n", ret); - return ret; - } + policy->freq_table = freq_table; /* All cores share the same clock and thus the same policy. */ cpumask_setall(policy->cpus);