From patchwork Mon Feb 26 05:08:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 10241247 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 EE32E60208 for ; Mon, 26 Feb 2018 05:09:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE457292DF for ; Mon, 26 Feb 2018 05:09:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D1A21297C3; Mon, 26 Feb 2018 05:09:54 +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 855AC292DF for ; Mon, 26 Feb 2018 05:09:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751848AbeBZFJx (ORCPT ); Mon, 26 Feb 2018 00:09:53 -0500 Received: from mail-pl0-f68.google.com ([209.85.160.68]:43449 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750882AbeBZFJx (ORCPT ); Mon, 26 Feb 2018 00:09:53 -0500 Received: by mail-pl0-f68.google.com with SMTP id f23so8659364plr.10 for ; Sun, 25 Feb 2018 21:09:53 -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=XSmBu9wyFwuM6caOzlnqkdIMA3t9CGAR9zSFgKNBkvE=; b=DsS3LFMrYOk//lDbyVJOw5B5P96H7rUYjZpGWRPgBe1R2FVSDci6Y08/MBGqhhp8vz rHdl8BmMYrondxQ0W+iFAjYtwJETBNB5Ma+7LM2ze4tcXUlUWEkl+iNSsRWWNWOuIqz5 06w76KWnOWnHtAHEH4F7EPLuACBkmFavE4ldo= 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=XSmBu9wyFwuM6caOzlnqkdIMA3t9CGAR9zSFgKNBkvE=; b=IDZaUGkBNZT2OwC2IcynNcgwudhrtnXYyDL73qKOaY894AwMDgNjlAoem/d1zrOIMk Fo+Gqy6mDJIg0rzlHSdEThiggWb6IIETzxcC08OideIp3gysFQJW9QiZSLhiMGDFDdk1 NC0wB4a+ejmF97B2W9JSbOL9MbS1OJ/zpOfZL97s7N24ZgO562jH9WwVc5Gwk7cR9zbh GEIjIPgIPzHqVpj8hKmp88XVmq8sER78rsWOPjuTRkrs/tnUz+2lSylJo2YB8qhyJl0h iwMn5UxZVCxo1IY7VBBhoADMFf0H58o5TdZwnRFC5BNaZCwumGtpxjmxqnMKzZfuo281 oCBw== X-Gm-Message-State: APf1xPBFvaWgJ46BfX7zLMoW/s1C9g7cNjltDau8N2R7e4ziuyrfkrd2 yd/QWJIm4By9qHLHcWFNLOuHSkGIOAs= X-Google-Smtp-Source: AH8x225jjSQSgL6e0T2Hj8ic9haJoBJGtPkoJX3FTKi8ZrlWhCU+Ovn/dSzNQh3cK4wYtAmxEmvtkg== X-Received: by 2002:a17:902:7b92:: with SMTP id w18-v6mr9183901pll.159.1519621792942; Sun, 25 Feb 2018 21:09:52 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id b6sm18315342pfm.160.2018.02.25.21.09.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:09:52 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot Subject: [PATCH 09/27] cpufreq: elanfreq: Don't validate the frequency table twice Date: Mon, 26 Feb 2018 10:38:52 +0530 Message-Id: <52a5c7064afa56fa8935a8d014c83537667bc026.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 elanfreq driver. Signed-off-by: Viresh Kumar --- drivers/cpufreq/elanfreq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/cpufreq/elanfreq.c b/drivers/cpufreq/elanfreq.c index 45e2ca62515e..03419f064752 100644 --- a/drivers/cpufreq/elanfreq.c +++ b/drivers/cpufreq/elanfreq.c @@ -165,7 +165,8 @@ static int elanfreq_cpu_init(struct cpufreq_policy *policy) if (pos->frequency > max_freq) pos->frequency = CPUFREQ_ENTRY_INVALID; - return cpufreq_table_validate_and_show(policy, elanfreq_table); + policy->freq_table = elanfreq_table; + return 0; }