lkml.org 
[lkml]   [2020]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH -next] ARM: uniphier: use for_each_matching_node() macro
Date
Use for_each_matching_node() macro instead of open coding it.

Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
---
arch/arm/mm/cache-uniphier.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mm/cache-uniphier.c b/arch/arm/mm/cache-uniphier.c
index ff2881458..112f19cb3 100644
--- a/arch/arm/mm/cache-uniphier.c
+++ b/arch/arm/mm/cache-uniphier.c
@@ -450,12 +450,12 @@ static int __init __uniphier_cache_init(struct device_node *np,

int __init uniphier_cache_init(void)
{
- struct device_node *np = NULL;
+ struct device_node *np;
unsigned int cache_level;
int ret = 0;

/* look for level 2 cache */
- while ((np = of_find_matching_node(np, uniphier_cache_match)))
+ for_each_matching_node(np, uniphier_cache_match)
if (!of_property_read_u32(np, "cache-level", &cache_level) &&
cache_level == 2)
break;
--
2.25.1
\
 
 \ /
  Last update: 2020-07-28 04:22    [W:0.027 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site