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: 129548 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp3230770lja; Sun, 25 Feb 2018 21:10:30 -0800 (PST) X-Google-Smtp-Source: AH8x2264B2XNbv2PBRzG8js+9BrMVATmyT2IqF2Ec96sbDwjhsb74p7zAdOx+fqqynKRheXr+F2i X-Received: by 10.167.130.88 with SMTP id e24mr9293146pfn.169.1519621829924; Sun, 25 Feb 2018 21:10:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519621829; cv=none; d=google.com; s=arc-20160816; b=mw7q9sHtjxNp0ScyNbKsB/eJUgIH7ygdynoeNlPogKO1Z+0MWBARQ6fXeEuFHmMrfS PyEJKw/0wDkr0VDTo8P+3BWYHJNHLD//HjCsGMKxVWSLzqBN5YQrgofyPl5fxRZm+/4T IbnRzCFgyU873zGfy8d7oVt4+ZGtOaE4s2pnmySQmMKWjNkYAh1ZNQCEGPx6VkVyHljc qllbneCJk/8z/G8z7a/Owoo5w0T07P3ELdoJacIqYGVAZ6jX0IqTMeFSZI1ltaTjpa9z fSPzkcdRR+P+fOm1fXbwhAG9xL60R9Srb/G5MiM7W4kaK3p2p5ZIOGYYDKGT0LgC20YR fPew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=QpBnUKkEdO9JU++m6n0Pp9F2+zCA8KV/Q5z84WSh15w=; b=NtqClj6GgwmxIngogqqNOsEN+6GjR3wiItUwTwbklpyL6oZi1HwKZeHPCTT6U8BmoD x9e1S0g2CcGBHa53VeM7LK/BdHh2WOYGKdlsph/TghRYP4wAXBiQ5fUIbAxvTOBmS1yX g4dfu6bx6ntLqknpUbcB1a4p2zoERj12SPfVUVFbbtsFGtrfMv91VAEvYnPrpQjSwf6j MtcgXwWPEjtRQgH8RynBf/0D9SXAlpPnfhlejiMWwTVzg3x5tLQZjPPNws+PG8NoIG4r LUcte4w8Z8990z42FxFkMGxFe24+XUNzvaNCGzcLYPBSRcbMdpe7P6qZbbH4dRrA4HT7 p2rQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IcpAmXDb; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h32-v6si6199354pld.217.2018.02.25.21.10.29; Sun, 25 Feb 2018 21:10:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IcpAmXDb; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750749AbeBZFK3 (ORCPT + 11 others); 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-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 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(-) -- 2.15.0.194.g9af6a3dea062 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 = {