From patchwork Mon Feb 26 05:08:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 10241255 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 2568A60208 for ; Mon, 26 Feb 2018 05:10:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 17DAE292DF for ; Mon, 26 Feb 2018 05:10:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0CA60297C3; Mon, 26 Feb 2018 05:10:06 +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 A5BDE292DF for ; Mon, 26 Feb 2018 05:10:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750839AbeBZFKE (ORCPT ); Mon, 26 Feb 2018 00:10:04 -0500 Received: from mail-pl0-f68.google.com ([209.85.160.68]:46913 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751175AbeBZFKE (ORCPT ); Mon, 26 Feb 2018 00:10:04 -0500 Received: by mail-pl0-f68.google.com with SMTP id x19so8654915plr.13 for ; Sun, 25 Feb 2018 21:10:04 -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=4Sogwb2lNk7UZvpkDPXA9TMONekYwcbfZW09UuiK0B0=; b=LGFPgNTlWFFsOS1oP6x/9CDJv3rJ5wEsp8ujHrrx6SiTXw0hu3q/lKS6Kj/NTZ000u 2CGzroIo7GexBRaoEDedUaqVW1t1BLMPT140+mncwPZd2IbdckOlyFXu4pV+aG4PuPwB bsrL4IomgQvV6yTbHNkAkegUhRl43s22980YE= 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=4Sogwb2lNk7UZvpkDPXA9TMONekYwcbfZW09UuiK0B0=; b=lfp8vZaUdRMARIBIRxCrWUqFgLRvC0LVyI37pgH40ovPK3rBHUS+22b/oS92LwEGW9 gWJTdacx9vZId3iYEG+bZaEWCC09dlUoNaYgkIqNQc5EJQtaKUbgfzMPZBgkJTIQXIu7 7JK+/hnu4+ER3dDKGoXJj5o7OWXGaCfaRA9LfXNB7aSm9I3gHVsUfuu4nL4/eO5h49Ss BHb/S6N53TknWvDQ6YkuRUkJ9mcN1Ccdu3KXcpkjq1swpYrvD43IdatgwhQJ89R6p/MD eySC0+hc59qF+t2yA4BLPn0bA++pu9Vb5W+oNKMGBatp3jXrgEosKPzHllDTbzKauxth XDxQ== X-Gm-Message-State: APf1xPC8Qiq7gIs2cCm+8Pn9vtN3Dgcawi3huRmTkKyhhywcboP/ajcj /Wd9uyOKNUB22SJ3I1xuFCb07g== X-Google-Smtp-Source: AH8x226KvPfLqzoePS6tJDYX0mKOJ1FSjk745EKnqPou1+c9tLD0cN6aGb8iH3aP711RupSKjKl7hQ== X-Received: by 2002:a17:902:bc41:: with SMTP id t1-v6mr9597309plz.436.1519621803764; Sun, 25 Feb 2018 21:10:03 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id h67sm2497243pfk.184.2018.02.25.21.10.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:10:03 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot Subject: [PATCH 13/27] cpufreq: p4-clockmod: Don't validate the frequency table twice Date: Mon, 26 Feb 2018 10:38:56 +0530 Message-Id: <5a33f133f779d8ac59354feadec0bdb205720042.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 p4-clockmod driver. Signed-off-by: Viresh Kumar --- drivers/cpufreq/p4-clockmod.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/cpufreq/p4-clockmod.c b/drivers/cpufreq/p4-clockmod.c index a25741b1281b..911206243050 100644 --- a/drivers/cpufreq/p4-clockmod.c +++ b/drivers/cpufreq/p4-clockmod.c @@ -202,8 +202,9 @@ static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy) /* the transition latency is set to be 1 higher than the maximum * transition latency of the ondemand governor */ policy->cpuinfo.transition_latency = 10000001; + policy->freq_table = &p4clockmod_table[0]; - return cpufreq_table_validate_and_show(policy, &p4clockmod_table[0]); + return 0; }