From patchwork Tue Apr 3 10:07:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 132710 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp3607251ljb; Tue, 3 Apr 2018 03:07:55 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+hyP42APp60+ktaYBk18IUF7tZAX6JOi/2m7OtyYb34eBfc462iRNcuHB4HRAK7iMCnnxU X-Received: by 10.101.101.7 with SMTP id x7mr8704598pgv.130.1522750075852; Tue, 03 Apr 2018 03:07:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522750075; cv=none; d=google.com; s=arc-20160816; b=YK2ZphaAiX3LoYVva5xHcx4tFXDxBjjIZfAcjTutKGdJyS20C/H7z1eyYOORMjP8lb rEIfa445Ttbef1FBUfkQsSDFpTIIRAu1H5+xIRWek7p8iAsxPGmUd4OiG/BBBPB3Q9C/ LqstE8LPt3iS7Brt3sUt+MqC+m93rlPuwDe/TsbGS2nyflmGWQb/piFBwCz4A6RoaLSv YEvOLIuTH7LNFJBbUA6be3uFp2+bhs0oRHJSzQfDptdicltAKwWtGTy9ztwmbrXvD2PB S215gzceGgNgAbTPyPbJ450b0fgrop+7/3Nk8yM9dIsvGA7Ap7r2+z8TxhXsGgiBRfHw +R/w== 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=nwSofTV9N8ugxM+QcG07G8fAlCwaT6x3rhVkDu924ac=; b=OrodEskam7gmgSaZgvtrFmZDAFduQMfvI19RulAXiaSy2qiBx+5xsP4TZ+ND2XbUa5 dXE7TZ+2WNkw0K6nndwUIvbYHiqFBya8Epe6Dt3i9gpoBJmx2fpTX66x2liTbmlsxQav SEz63OArdQxv4f+ysrXQZ9JfhXYnL4PqAyXnq8pZ8qGtETXDQdZfNBODxncqRbPKwdnS X+/aWL4XZ8/IfkUrt3q/EN5vForzZN7lY/3yJ/QbTYJYnTpu2QXUxbNdv1UF8Vt6SwWb 8Gj5korojwSKdjEVcwkiAOjAm+9xQZLb4bo4rdJ104uR5y4gZgmEAGLaxYLwlOPcZfsE cnPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NPLtwdqm; 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 u6-v6si185259pld.628.2018.04.03.03.07.55; Tue, 03 Apr 2018 03:07:55 -0700 (PDT) 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=NPLtwdqm; 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 S1755250AbeDCKHx (ORCPT + 11 others); Tue, 3 Apr 2018 06:07:53 -0400 Received: from mail-pl0-f65.google.com ([209.85.160.65]:35966 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755162AbeDCKHw (ORCPT ); Tue, 3 Apr 2018 06:07:52 -0400 Received: by mail-pl0-f65.google.com with SMTP id 91-v6so8144539pld.3 for ; Tue, 03 Apr 2018 03:07:52 -0700 (PDT) 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=nwSofTV9N8ugxM+QcG07G8fAlCwaT6x3rhVkDu924ac=; b=NPLtwdqmTXJjKrUex30TnofmEe0KeKfZTRgt5GLdU3WCH3cuqDdiZf2kJeUGfW4h5J 8xAyi2QBEivL5kOtEa4VeHtlANildE/ECsB55ngOdcIcWOrAn1N6FvqaDA3xMSJRu/M9 D7WV0+3XqrJnqGYOWAGo/TIUh0H8je0zpFGSo= 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=nwSofTV9N8ugxM+QcG07G8fAlCwaT6x3rhVkDu924ac=; b=jGX3WHEM+qwMZBQpaMQz1aZcvcAsnmV4r9KvCSdtPws490OzpTTaiUtmIrnXHV307d I/DB7NOq0JtauIPBH/566aKezpAR0J6fhx1dM4ZsTMVZSSY5t/1BWDMzX4GmEzjt3Os5 tfwvxo5Bc97FtxRj62rIVAHNr+bXyaW/jsu1tGJvXYVzPN0TNSZotu9a82uNuKavq+jA 2nEEHm4FAwKWZ6gOFYh+ks4UweVj5LfzZRDVjUU0BsTVW/AKllAvwSronvbQrRvcXjqU D5kP+OZGZ7uHO17z9n6wxie8fxuH2DyxuvF6Q72/bbTbEcFdt+OIPzCIIk+a9MJwyK+0 rX3Q== X-Gm-Message-State: AElRT7Hm+BR9r3JS1KRWFUV4IKB5X2wu8XIBlf2HBZTem8zTdfqm4Isy 3MpM2opRYojfBy+o6sLH6I1dJg== X-Received: by 10.98.31.67 with SMTP id f64mr10178661pff.176.1522750071843; Tue, 03 Apr 2018 03:07:51 -0700 (PDT) Received: from localhost ([122.171.228.188]) by smtp.gmail.com with ESMTPSA id o123sm4337417pga.76.2018.04.03.03.07.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Apr 2018 03:07:51 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , Sudeep Holla Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot Subject: [PATCH V2 2/2] cpufreq: Drop cpufreq_table_validate_and_show() Date: Tue, 3 Apr 2018 15:37:39 +0530 Message-Id: <9ff535a3f9f2a14e8e26fffedf5688a8189c212f.1522749887.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 This isn't used anymore. Remove the helper and update documentation accordingly. Signed-off-by: Viresh Kumar --- Documentation/cpu-freq/core.txt | 12 +++++------- Documentation/cpu-freq/cpu-drivers.txt | 6 ++---- drivers/cpufreq/freq_table.c | 14 -------------- include/linux/cpufreq.h | 2 -- 4 files changed, 7 insertions(+), 27 deletions(-) -- 2.15.0.194.g9af6a3dea062 diff --git a/Documentation/cpu-freq/core.txt b/Documentation/cpu-freq/core.txt index 978463a7c81e..073f128af5a7 100644 --- a/Documentation/cpu-freq/core.txt +++ b/Documentation/cpu-freq/core.txt @@ -97,12 +97,10 @@ flags - flags of the cpufreq driver ================================================================== For details about OPP, see Documentation/power/opp.txt -dev_pm_opp_init_cpufreq_table - cpufreq framework typically is initialized with - cpufreq_table_validate_and_show() which is provided with the list of - frequencies that are available for operation. This function provides - a ready to use conversion routine to translate the OPP layer's internal - information about the available frequencies into a format readily - providable to cpufreq. +dev_pm_opp_init_cpufreq_table - + This function provides a ready to use conversion routine to translate + the OPP layer's internal information about the available frequencies + into a format readily providable to cpufreq. WARNING: Do not use this function in interrupt context. @@ -112,7 +110,7 @@ dev_pm_opp_init_cpufreq_table - cpufreq framework typically is initialized with /* Do things */ r = dev_pm_opp_init_cpufreq_table(dev, &freq_table); if (!r) - cpufreq_table_validate_and_show(policy, freq_table); + policy->freq_table = freq_table; /* Do other things */ } diff --git a/Documentation/cpu-freq/cpu-drivers.txt b/Documentation/cpu-freq/cpu-drivers.txt index 61546ac578d6..6e353d00cdc6 100644 --- a/Documentation/cpu-freq/cpu-drivers.txt +++ b/Documentation/cpu-freq/cpu-drivers.txt @@ -259,10 +259,8 @@ CPUFREQ_ENTRY_INVALID. The entries don't need to be in sorted in any particular order, but if they are cpufreq core will do DVFS a bit quickly for them as search for best match is faster. -By calling cpufreq_table_validate_and_show(), the cpuinfo.min_freq and -cpuinfo.max_freq values are detected, and policy->min and policy->max -are set to the same values. This is helpful for the per-CPU -initialization stage. +The cpufreq table is verified automatically by the core if the policy contains a +valid pointer in its policy->freq_table field. cpufreq_frequency_table_verify() assures that at least one valid frequency is within policy->min and policy->max, and all other criteria diff --git a/drivers/cpufreq/freq_table.c b/drivers/cpufreq/freq_table.c index 10e119ae66dd..3a8cc99e6815 100644 --- a/drivers/cpufreq/freq_table.c +++ b/drivers/cpufreq/freq_table.c @@ -352,20 +352,6 @@ static int set_freq_table_sorted(struct cpufreq_policy *policy) return 0; } -int cpufreq_table_validate_and_show(struct cpufreq_policy *policy, - struct cpufreq_frequency_table *table) -{ - int ret; - - ret = cpufreq_frequency_table_cpuinfo(policy, table); - if (ret) - return ret; - - policy->freq_table = table; - return 0; -} -EXPORT_SYMBOL_GPL(cpufreq_table_validate_and_show); - int cpufreq_table_validate_and_sort(struct cpufreq_policy *policy) { int ret; diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 1fe49724da9e..87f48dd932eb 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -960,8 +960,6 @@ extern void arch_set_freq_scale(struct cpumask *cpus, unsigned long cur_freq, extern struct freq_attr cpufreq_freq_attr_scaling_available_freqs; extern struct freq_attr cpufreq_freq_attr_scaling_boost_freqs; extern struct freq_attr *cpufreq_generic_attr[]; -int cpufreq_table_validate_and_show(struct cpufreq_policy *policy, - struct cpufreq_frequency_table *table); int cpufreq_table_validate_and_sort(struct cpufreq_policy *policy); unsigned int cpufreq_generic_get(unsigned int cpu);