* [PATCH 0/8] of_find_matching_node/of_match_node -> of_find_matching_node_and_match
@ 2014-02-11 16:23 Josh Cartwright
2014-02-11 16:24 ` [PATCH 8/8] cpufreq: ppc: make use of of_find_matching_node_and_match Josh Cartwright
0 siblings, 1 reply; 3+ messages in thread
From: Josh Cartwright @ 2014-02-11 16:23 UTC (permalink / raw)
To: linux-arm-kernel, cpufreq, linux-pm
Cc: devicetree, linux-kernel, Stephen Warren, Laurent Pinchart,
linux-c6x-dev
This patchset updates users of the of_find_matching_node()/of_match_node() pair
to leverage of_find_matching_node_and_match(), which only requires one walk
through the match table. This functionality was added by Stephen Warren[1], and
landed in v3.8.
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
1: 50c8af4cf9 (of: introduce for_each_matching_node_and_match())
Josh Cartwright (8):
bus: arm-cci: make use of of_find_matching_node_and_match
bus: mvebu-mbus: make use of of_find_matching_node_and_match
ARM: at91: make use of of_find_matching_node_and_match
ARM: mvebu: make use of of_find_matching_node_and_match
ARM: prima2: make use of of_find_matching_node_and_match
ARM: l2x0: make use of of_find_matching_node_and_match
C6X: make use of of_find_matching_node_and_match
cpufreq: ppc: make use of of_find_matching_node_and_match
arch/arm/mach-at91/setup.c | 16 ++++------------
arch/arm/mach-mvebu/system-controller.c | 9 ++++-----
arch/arm/mach-prima2/l2x0.c | 7 ++++---
arch/arm/mm/cache-l2x0.c | 5 +++--
arch/c6x/platforms/plldata.c | 7 +++----
drivers/bus/arm-cci.c | 5 +++--
drivers/bus/mvebu-mbus.c | 3 +--
drivers/cpufreq/ppc-corenet-cpufreq.c | 3 +--
8 files changed, 23 insertions(+), 32 deletions(-)
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 8/8] cpufreq: ppc: make use of of_find_matching_node_and_match
2014-02-11 16:23 [PATCH 0/8] of_find_matching_node/of_match_node -> of_find_matching_node_and_match Josh Cartwright
@ 2014-02-11 16:24 ` Josh Cartwright
2014-02-12 5:01 ` Viresh Kumar
0 siblings, 1 reply; 3+ messages in thread
From: Josh Cartwright @ 2014-02-11 16:24 UTC (permalink / raw)
To: Rafael J. Wysocki, Viresh Kumar
Cc: devicetree, linux-kernel, cpufreq, linux-pm
Instead of the of_find_matching_node()/of_match_node() pair, which requires two
iterations through the match table, make use of of_find_matching_node_and_match(),
which only iterates through the table once.
Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
---
drivers/cpufreq/ppc-corenet-cpufreq.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/cpufreq/ppc-corenet-cpufreq.c b/drivers/cpufreq/ppc-corenet-cpufreq.c
index 051000f..041ef3a 100644
--- a/drivers/cpufreq/ppc-corenet-cpufreq.c
+++ b/drivers/cpufreq/ppc-corenet-cpufreq.c
@@ -278,7 +278,7 @@ static int __init ppc_corenet_cpufreq_init(void)
const struct soc_data *data;
unsigned int cpu;
- np = of_find_matching_node(NULL, node_matches);
+ np = of_find_matching_node_and_match(NULL, node_matches, &match);
if (!np)
return -ENODEV;
@@ -288,7 +288,6 @@ static int __init ppc_corenet_cpufreq_init(void)
cpumask_copy(per_cpu(cpu_mask, cpu), cpu_core_mask(cpu));
}
- match = of_match_node(node_matches, np);
data = match->data;
if (data) {
if (data->flag)
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH 8/8] cpufreq: ppc: make use of of_find_matching_node_and_match
2014-02-11 16:24 ` [PATCH 8/8] cpufreq: ppc: make use of of_find_matching_node_and_match Josh Cartwright
@ 2014-02-12 5:01 ` Viresh Kumar
0 siblings, 0 replies; 3+ messages in thread
From: Viresh Kumar @ 2014-02-12 5:01 UTC (permalink / raw)
To: Josh Cartwright
Cc: Rafael J. Wysocki, devicetree@vger.kernel.org,
Linux Kernel Mailing List, cpufreq@vger.kernel.org,
linux-pm@vger.kernel.org
On 11 February 2014 21:54, Josh Cartwright <joshc@codeaurora.org> wrote:
> Instead of the of_find_matching_node()/of_match_node() pair, which requires two
> iterations through the match table, make use of of_find_matching_node_and_match(),
> which only iterates through the table once.
>
> Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
> ---
> drivers/cpufreq/ppc-corenet-cpufreq.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/cpufreq/ppc-corenet-cpufreq.c b/drivers/cpufreq/ppc-corenet-cpufreq.c
> index 051000f..041ef3a 100644
> --- a/drivers/cpufreq/ppc-corenet-cpufreq.c
> +++ b/drivers/cpufreq/ppc-corenet-cpufreq.c
> @@ -278,7 +278,7 @@ static int __init ppc_corenet_cpufreq_init(void)
> const struct soc_data *data;
> unsigned int cpu;
>
> - np = of_find_matching_node(NULL, node_matches);
> + np = of_find_matching_node_and_match(NULL, node_matches, &match);
> if (!np)
> return -ENODEV;
>
> @@ -288,7 +288,6 @@ static int __init ppc_corenet_cpufreq_init(void)
> cpumask_copy(per_cpu(cpu_mask, cpu), cpu_core_mask(cpu));
> }
>
> - match = of_match_node(node_matches, np);
> data = match->data;
> if (data) {
> if (data->flag)
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-02-12 5:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-11 16:23 [PATCH 0/8] of_find_matching_node/of_match_node -> of_find_matching_node_and_match Josh Cartwright
2014-02-11 16:24 ` [PATCH 8/8] cpufreq: ppc: make use of of_find_matching_node_and_match Josh Cartwright
2014-02-12 5:01 ` Viresh Kumar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).