From patchwork Mon Feb 26 05:09:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 10241263 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 D736260208 for ; Mon, 26 Feb 2018 05:10:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C8900292DF for ; Mon, 26 Feb 2018 05:10:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BBAFD297C3; Mon, 26 Feb 2018 05:10:16 +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 67AB4292DF for ; Mon, 26 Feb 2018 05:10:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751963AbeBZFKP (ORCPT ); Mon, 26 Feb 2018 00:10:15 -0500 Received: from mail-pl0-f66.google.com ([209.85.160.66]:38458 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751175AbeBZFKP (ORCPT ); Mon, 26 Feb 2018 00:10:15 -0500 Received: by mail-pl0-f66.google.com with SMTP id d4so8656815pll.5 for ; Sun, 25 Feb 2018 21:10:15 -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=1K0fXZHrW+EBKHP5ADnHtlBn1AcfLerNfQHxQ+r00FI=; b=PMW4Eq24hBzqkOzf/0z8IUZmOdXofq8Ed4zsN7dsc87ixzgcGux9kCCoiKJfFPZ8NS JkIj+H0Xg+jnexe4Jx3gHUAC5RFOz93d+AEndyARhNv513Q3rlR2WG6krEo9pCg5X5Uo L2SrpUO7BavSXfQiuMx7D1d0z7YlQHIzJK5pc= 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=1K0fXZHrW+EBKHP5ADnHtlBn1AcfLerNfQHxQ+r00FI=; b=dTzTCQQH8lv4hNGZnZcGPwnl8kuJaaqwU3LxQaikqdB0619fXNo9Qy6ANKTj49jKv6 cnoxmvXxG39YW3FDOMfNsTvMpT8gO6GPz3jbvUouXg+iB4tHhuZFH0N3ybbfUfDkIFdD rsIY+lO84CQcCTS5M/+cj6v5gqRjbvWvQq7BudX7TXakfnPWKB7P/aHE0HLQsTHsXSS5 Yx3NHZD5dDMzQH5LoFkZ7ClHLz/D5pz/Rnm0ubFXFvhBpc5JJRXLvgA1jjh+QJOgy3tA ybpQBUaUfW6Nw6SyunP26WxSfIrzpthhL7Gr2bK/BjasxptEYfLJgd+MN7030T6oK87S oWNw== X-Gm-Message-State: APf1xPAgBgWKukOk/RpxeHjoVIg8Lf/tC91uJTG11E7gtPxncyLqBjZl jQYCQeg1MNPuxIDR3MdclcmmbA== X-Google-Smtp-Source: AH8x225zed/pRezluUabybLG4DpVPWpQSES+egaN/USnkTIY1gRHPdQluNvSiJaaWOQyNq9iiHCJ9g== X-Received: by 2002:a17:902:6805:: with SMTP id h5-v6mr9413628plk.46.1519621814792; Sun, 25 Feb 2018 21:10:14 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id s62sm12512453pgc.12.2018.02.25.21.10.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:10:14 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot Subject: [PATCH 17/27] cpufreq: pxa: Don't validate the frequency table twice Date: Mon, 26 Feb 2018 10:39:00 +0530 Message-Id: <8e6f90ab32a92c6256885f5b48837e49eb623168.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 pxa driver. Signed-off-by: Viresh Kumar --- drivers/cpufreq/pxa2xx-cpufreq.c | 4 ++-- drivers/cpufreq/pxa3xx-cpufreq.c | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/cpufreq/pxa2xx-cpufreq.c b/drivers/cpufreq/pxa2xx-cpufreq.c index 06b024a3e474..46254e583982 100644 --- a/drivers/cpufreq/pxa2xx-cpufreq.c +++ b/drivers/cpufreq/pxa2xx-cpufreq.c @@ -292,10 +292,10 @@ static int pxa_cpufreq_init(struct cpufreq_policy *policy) pr_info("using %s frequency table\n", pxa255_turbo_table ? "turbo" : "run"); - cpufreq_table_validate_and_show(policy, pxa255_freq_table); + policy->freq_table = pxa255_freq_table; } else if (cpu_is_pxa27x()) { - cpufreq_table_validate_and_show(policy, pxa27x_freq_table); + policy->freq_table = pxa27x_freq_table; } pr_info("frequency change support initialized\n"); diff --git a/drivers/cpufreq/pxa3xx-cpufreq.c b/drivers/cpufreq/pxa3xx-cpufreq.c index a01275900389..7acc7fa4536d 100644 --- a/drivers/cpufreq/pxa3xx-cpufreq.c +++ b/drivers/cpufreq/pxa3xx-cpufreq.c @@ -108,7 +108,9 @@ static int setup_freqs_table(struct cpufreq_policy *policy, pxa3xx_freqs_num = num; pxa3xx_freqs_table = table; - return cpufreq_table_validate_and_show(policy, table); + policy->freq_table = table; + + return 0; } static void __update_core_freq(struct pxa3xx_freq_info *info)