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: 129535 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp3230342lja; Sun, 25 Feb 2018 21:09:54 -0800 (PST) X-Google-Smtp-Source: AH8x224kFJsoWj6RE9bub7vhEBEPrqX1YsGt3QqXRf5uA2rAbCIv2kUcmE41SOOZ24w1CGefrHA4 X-Received: by 10.101.77.201 with SMTP id q9mr7388818pgt.395.1519621794737; Sun, 25 Feb 2018 21:09:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519621794; cv=none; d=google.com; s=arc-20160816; b=mekJcgndYhXNuugUfOeThtV1R2wrGbMaqp2ssXxc3xMcaUYC2xxmpEmpjR19SqCDye uYt/nabZevDzkC23kkaXxDWvO79QOKuNYimyKkNoUvHUNzlVWAkYhnIu8R82Q1WlivBm pbp7/PvqTHNGFsc45i/Ot0/YBkLrY8IW0HSA1fokWLTErwktpR+9qS/sJel+aq8vMCVT Jnzh6ERFPRe/Qfucxuo/uV2Gmzm4QIMsspVPkGhTWJsja/X0buLOoJV9aDOIMHgUnaGh 2p+EzRKcnzd4fpcp64Vd3MVIxGEggYbp6Lfw6l/8I0cP1G8gy6x4OYDhbm+EHOWtPTXZ Caeg== 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=XSmBu9wyFwuM6caOzlnqkdIMA3t9CGAR9zSFgKNBkvE=; b=eH71Esuf3v0D+BYkRyw3tlwsq2CWU4aFGNta+rnMhYXbJAVuTrBWplP1PkcX0w2wW0 RLEawR0ZKwOSjyfN6zc5lERZPk8zYKYoXjClx14kR9BlLRGrAd0d32MPH8YpuM+edJaY nNl0pRz/z73zufhuUt68GBI3cUgPQrksaMKVXZ1cs4YtQbxuvPWU2NBzQvFdFvkPn3Mv 2aTEkAxX5a7Ci95/1/psPXPcTlVFWTIZLmyB/C6KeIoWfn/SRzM0pQ9ZnQyDj6pvo9Ls jvHGVt1szrnuFFpG19VuwNkJmPhVcZuJOon3RKJrgFnr0FdGe+uSgJhXGf/6eSsC8D5p loyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DsS3LFMr; 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.54; Sun, 25 Feb 2018 21:09:54 -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=DsS3LFMr; 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 S1751848AbeBZFJx (ORCPT + 11 others); 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-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 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(-) -- 2.15.0.194.g9af6a3dea062 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; }