From patchwork Mon Feb 26 05:08:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 129537 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp3230389lja; Sun, 25 Feb 2018 21:10:00 -0800 (PST) X-Google-Smtp-Source: AH8x227l96n4IQmY36RCTSFRTUgRZJ5nZjzxh9HK08E53UfxCgB0Ry5Z3UJQNymZk0ogjCDdUgRz X-Received: by 10.98.83.6 with SMTP id h6mr9458231pfb.174.1519621800173; Sun, 25 Feb 2018 21:10:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519621800; cv=none; d=google.com; s=arc-20160816; b=KY+xQQUwe05mq/eeSkJJhtGxxHXiMl1WU849xcU8ZI7Ki5cQOYCFRjaAFmCrUKVFGj AqwXvcUuinavH/8vNtNTy/aSRDQ3vzQCT1IFEwvP1VOskCiUsB3vXozOTQiSARC213jx Af0llOBcfn1rF2IcYU5Bli9MM0vrqPG3wWGQIFnOZVZylv8omTnunn4qKqAjU27+auz7 Z5hzhnRHlsF5SpcgmW7bhV/8r0r6Xdc9S0V2xEnbxCAltJHNCazOS5lZA0TOCn1BTSdJ JImyqao1PP3CLZedEoDdcw6HFIOa6OsIoRAVZzO2vT2wFmj0OiVKRgGE6Db7nNncD7Cj kW8g== 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=4C3iPkRzW2cWckGqrnavW37hoxQuKqY46ZZCxA1H7Fc=; b=Npdoc4SgRv/LQNm936EHJzlkdQuDqCh7F+B+YYKRhiu4AQF7/lORKw3VxnuXo+Ks6g g8mvtUfdXLlTOTEzrajWD2uiLZlApiwv5M1/tKKu5e2dy1WvX6fXCIZSu7IF0YPDQDLw OJxD8au1RaJ4yh7Z+5V6iB4Jv1LhrTgznWKiKLAvtbZqIetK6JAY1Y2r8i3B5NAlAwbb OgqaF2cxiakFF3CKjhtPBoucrwldQmgnAO5nItS6Vn8/tWVRHfGD0WuyoxUtVimmHZTf 277GzTL2pK60Knt+usBCxuwpl7MMJ2VOYtJStY/ifvrAK0pMJ2CFFjoGmB3pxB9SSnbV vSYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QCDRWMo4; 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.09.59; Sun, 25 Feb 2018 21:10:00 -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=QCDRWMo4; 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 S1751947AbeBZFJ7 (ORCPT + 11 others); Mon, 26 Feb 2018 00:09:59 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:41686 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750882AbeBZFJ6 (ORCPT ); Mon, 26 Feb 2018 00:09:58 -0500 Received: by mail-pf0-f195.google.com with SMTP id f80so977589pfa.8 for ; Sun, 25 Feb 2018 21:09:58 -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=4C3iPkRzW2cWckGqrnavW37hoxQuKqY46ZZCxA1H7Fc=; b=QCDRWMo4soWPdgR05NAIJvFn0aNFKKMPfVeAB3uYhNmb0cKZEjn5ohkanHupIg4fx7 FtaqJOq3Pj2WG6HMmwxKJ1E3Un68FODfuClAVysB67OyRaw4AukHacVIiLafg0EpfxCw zZCAhk185ChbHKl6UIfO1HfyCPk+sLnQwPvhg= 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=4C3iPkRzW2cWckGqrnavW37hoxQuKqY46ZZCxA1H7Fc=; b=HE+TTwllz5L2e0O2tq7DGJttE4Yr6Zx7xxEn95NgtZFLUqyUMob7dGnmmddlpjlgQg 4ZdYjYoCApVA/Wkb357pyZUqu2s3lT1zRJra/oaPBYpU70A0gekhvlKFWXOaME6cgOlJ sietwELvWAIMNobopinRdLqwv/y3S2PRsRDOmGm1vZc/gZ6PjulUeimapXH3j1VHmbSg gv7fz+rzb6Gipr35kL837Lqc29H5y6BpoMnBozHPml/GztTDKxGL7eUYBngJDEkBl34Z o8Np3KCmuAW8EzTWlBTnf0i+pSlSmkBrtNgwYGnEtu4Rmz3i6ulumDQ7by0YgRtqJC1i 0rbg== X-Gm-Message-State: APf1xPDzO7HR83ABaALA6UKnbfPWgc/6L9pKUGLebietVsZxuoUn3+Kr A/XTRV8HMWdHx8L7UxJjzXfSIA== X-Received: by 10.99.190.15 with SMTP id l15mr7641869pgf.325.1519621798400; Sun, 25 Feb 2018 21:09:58 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id a13sm14388194pgd.1.2018.02.25.21.09.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:09:57 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot Subject: [PATCH 11/27] cpufreq: longhaul: Don't validate the frequency table twice Date: Mon, 26 Feb 2018 10:38:54 +0530 Message-Id: <86eda8f5f00916b8dd4cd9d7295a16ab2376a4d5.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 longhaul driver. Signed-off-by: Viresh Kumar --- drivers/cpufreq/longhaul.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.15.0.194.g9af6a3dea062 diff --git a/drivers/cpufreq/longhaul.c b/drivers/cpufreq/longhaul.c index f730b6528c18..61a4c5b08219 100644 --- a/drivers/cpufreq/longhaul.c +++ b/drivers/cpufreq/longhaul.c @@ -895,8 +895,9 @@ static int longhaul_cpu_init(struct cpufreq_policy *policy) longhaul_setup_voltagescaling(); policy->transition_delay_us = 200000; /* usec */ + policy->freq_table = longhaul_table; - return cpufreq_table_validate_and_show(policy, longhaul_table); + return 0; } static struct cpufreq_driver longhaul_driver = {