From patchwork Mon Feb 26 05:09:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 10241279 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 8197160208 for ; Mon, 26 Feb 2018 05:10:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 731D5292DF for ; Mon, 26 Feb 2018 05:10:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6820C297C3; Mon, 26 Feb 2018 05:10:35 +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 16F1A292DF for ; Mon, 26 Feb 2018 05:10:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751094AbeBZFKe (ORCPT ); Mon, 26 Feb 2018 00:10:34 -0500 Received: from mail-pl0-f67.google.com ([209.85.160.67]:42176 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750929AbeBZFKd (ORCPT ); Mon, 26 Feb 2018 00:10:33 -0500 Received: by mail-pl0-f67.google.com with SMTP id 31so8649879ple.9 for ; Sun, 25 Feb 2018 21:10:33 -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=Ff3C3HNXm7RhCecxML+vCKakOrbNexctLR5loscC010=; b=aQnhbOxp2IstPYerDwKIUTlA5B9irX06HGyL0Lyh7KPRLhZp4gEpds2ploH7cHhUlQ LU63tGVfctFvg5FIhCzLT+KPEO7GHm0S4k21qYdDXh9gQx3jevqnPsSxytcg01a3/v5M 7LPpk3leQPNJuu9hA/u3EPZTUs2JaZf7YbpP0= 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=Ff3C3HNXm7RhCecxML+vCKakOrbNexctLR5loscC010=; b=UwpQ/wB6W+uMvdrXE4bVQCZds7KuvRN7nie6kBT4tyPQX5O0FXwT4KNjR9OxLi7Duk n/hQceWINkcEB2YOYHxa4ezZAuDSqWWxkHKc/31PzZVRpHSxx4I8i8j/UN61qOMvUaSx rheMs6sOgTzPttcQIsJHuMGT2hznyWAq4WNu9R0KLogNFoywXeZlhOtEGdxRYKmUuDo+ Ru2v2QYVl2JZaPohbDPh7OeItbAhJLnlv+OSJQUV0GZ2u26OCCM6gw/eMGX8ZO7RnNYT FNoRfXaZ4ru3bubXpMiQzn3/zqzg2q6kU11ieFC3MN0zTWkWrvf9sirAAygXeBAT6ts4 CO8g== X-Gm-Message-State: APf1xPAA9AeAh5A4GNZWlHyegDO8iS31E3/YBggZAMqkfaVvucSRCkYE TNRRvuhjRRSr0KoywV/coIxk/Q== X-Google-Smtp-Source: AH8x226l2NavBSi+HaJJ7rJeR4fJtzyJH4StUKOICu/lTnURQ74/0u3vkCBWqUaTJH+iivb2YRJOFQ== X-Received: by 2002:a17:902:b101:: with SMTP id q1-v6mr9508390plr.287.1519621833487; Sun, 25 Feb 2018 21:10:33 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id n81sm17865703pfk.152.2018.02.25.21.10.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:10:33 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot Subject: [PATCH 24/27] cpufreq: sparc: Don't validate the frequency table twice Date: Mon, 26 Feb 2018 10:39:07 +0530 Message-Id: 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 sparc driver. Signed-off-by: Viresh Kumar --- drivers/cpufreq/sparc-us2e-cpufreq.c | 3 ++- drivers/cpufreq/sparc-us3-cpufreq.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/cpufreq/sparc-us2e-cpufreq.c b/drivers/cpufreq/sparc-us2e-cpufreq.c index 90f33efee5fc..bbd1d1e166b8 100644 --- a/drivers/cpufreq/sparc-us2e-cpufreq.c +++ b/drivers/cpufreq/sparc-us2e-cpufreq.c @@ -292,8 +292,9 @@ static int __init us2e_freq_cpu_init(struct cpufreq_policy *policy) policy->cpuinfo.transition_latency = 0; policy->cur = clock_tick; + policy->freq_table = table; - return cpufreq_table_validate_and_show(policy, table); + return 0; } static int us2e_freq_cpu_exit(struct cpufreq_policy *policy) diff --git a/drivers/cpufreq/sparc-us3-cpufreq.c b/drivers/cpufreq/sparc-us3-cpufreq.c index 30645b0118f9..51e3c6018e74 100644 --- a/drivers/cpufreq/sparc-us3-cpufreq.c +++ b/drivers/cpufreq/sparc-us3-cpufreq.c @@ -136,8 +136,9 @@ static int __init us3_freq_cpu_init(struct cpufreq_policy *policy) policy->cpuinfo.transition_latency = 0; policy->cur = clock_tick; + policy->freq_table = table; - return cpufreq_table_validate_and_show(policy, table); + return 0; } static int us3_freq_cpu_exit(struct cpufreq_policy *policy)