From patchwork Mon Feb 26 05:09:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 10241275 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 21FDF60208 for ; Mon, 26 Feb 2018 05:10:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 12B09292DF for ; Mon, 26 Feb 2018 05:10:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 077AC297C3; Mon, 26 Feb 2018 05:10:30 +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 B3389292DF for ; Mon, 26 Feb 2018 05:10:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750749AbeBZFK3 (ORCPT ); Mon, 26 Feb 2018 00:10:29 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:38686 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750748AbeBZFK2 (ORCPT ); Mon, 26 Feb 2018 00:10:28 -0500 Received: by mail-pg0-f65.google.com with SMTP id l24so5782323pgc.5 for ; Sun, 25 Feb 2018 21:10:28 -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=QpBnUKkEdO9JU++m6n0Pp9F2+zCA8KV/Q5z84WSh15w=; b=IcpAmXDbsoYgWbeg2u8cAVLMwA97pp21lycud4n7KBX6Bf0lszntUf2OAuh+GqYzyV iTZd11RVDmpnAtj2efXfuF/V4ZJ4s8IgYcK3CSwc8Ipr7ans40VCIZto/tpK4NUl4qRE 5HCriGWc1g+FzDvrBjlYD2AmpL5JdDCvmS6ao= 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=QpBnUKkEdO9JU++m6n0Pp9F2+zCA8KV/Q5z84WSh15w=; b=g6247zq4DZYMOcKfvklHbeTjyXw92ejP10+aqWla9fVT/4I+sFjLqVpKTaKQbZwWrU nFCFwyZ7sWv5Pt13TnKF2188Dnyo0PlGu3wWTFK+444eQm6lcJQIYaUFRIWKHWAVmJaG gNojbcFoQiVpKT0nWVBsjJ2Du0jopF2zot0k44VuFihLDmKIScvJCv/kWI2kSGna5LuF J0MM1Tw5gC1+cETTuivU/jzyaJCgQPlo1ovc5HSe+EUgPKOzQAnQq2ijmN4N+RAhhiE1 oxewv3yUXTgCpYfd+eEaUGqTXXYUG3xHgaa7qvAA5uLWIgcz+7bkmsaHOrI0xg6IOaZi KQuw== X-Gm-Message-State: APf1xPAMZDtDv1eckFYlXEUJnhcE0JnGjLD9dsxOjzDV0i1t+1OXw2Nf /+NYyOvwS5e2Wtclc9sOJbGc4A== X-Google-Smtp-Source: AH8x227OACCak4zyUiNeIMGzp80jOWrgJoDeu/RVNduve/n9zAYmpgpzUfhL9gQ2iFzd7ruxva2X2g== X-Received: by 10.98.211.198 with SMTP id z67mr9568685pfk.0.1519621828094; Sun, 25 Feb 2018 21:10:28 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id u9sm13252099pgb.11.2018.02.25.21.10.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:10:27 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot Subject: [PATCH 22/27] cpufreq: sfi: Don't validate the frequency table twice Date: Mon, 26 Feb 2018 10:39:05 +0530 Message-Id: <38b0c450b600183f94621f8f4fc9d2ae8948c73b.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 sfi driver. Signed-off-by: Viresh Kumar --- drivers/cpufreq/sfi-cpufreq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/cpufreq/sfi-cpufreq.c b/drivers/cpufreq/sfi-cpufreq.c index 3779742f86e3..9767afe05da2 100644 --- a/drivers/cpufreq/sfi-cpufreq.c +++ b/drivers/cpufreq/sfi-cpufreq.c @@ -72,8 +72,9 @@ static int sfi_cpufreq_cpu_init(struct cpufreq_policy *policy) { policy->shared_type = CPUFREQ_SHARED_TYPE_HW; policy->cpuinfo.transition_latency = 100000; /* 100us */ + policy->freq_table = freq_table; - return cpufreq_table_validate_and_show(policy, freq_table); + return 0; } static struct cpufreq_driver sfi_cpufreq_driver = {