[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20200728022542.86566-1-miaoqinglang@huawei.com>
Date: Tue, 28 Jul 2020 10:25:42 +0800
From: Qinglang Miao <miaoqinglang@...wei.com>
To: Masahiro Yamada <yamada.masahiro@...ionext.com>,
Russell King <linux@...linux.org.uk>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC: <linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>
Subject: [PATCH -next] ARM: uniphier: use for_each_matching_node() macro
Use for_each_matching_node() macro instead of open coding it.
Signed-off-by: Qinglang Miao <miaoqinglang@...wei.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
Powered by blists - more mailing lists