[PATCH -next] cxl: Use for_each_compatible_node() macro

Subsystems: char and misc drivers, the rest

STALE3672d

4 messages, 4 authors, 2016-07-15 · open the first message on its own page

[PATCH -next] cxl: Use for_each_compatible_node() macro

From: <hidden>
Date: 2016-07-12 11:30:31

From: Wei Yongjun <redacted>

Use for_each_compatible_node() macro instead of open coding it.

Generated by Coccinelle.

Signed-off-by: Wei Yongjun <redacted>
---
 drivers/misc/cxl/base.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/misc/cxl/base.c b/drivers/misc/cxl/base.c
index e6f49ac..2330980 100644
--- a/drivers/misc/cxl/base.c
+++ b/drivers/misc/cxl/base.c
@@ -95,7 +95,7 @@ EXPORT_SYMBOL_GPL(cxl_update_properties);
 
 static int __init cxl_base_init(void)
 {
-	struct device_node *np = NULL;
+	struct device_node *np;
 	struct platform_device *dev;
 	int count = 0;
 
@@ -105,8 +105,7 @@ static int __init cxl_base_init(void)
 	if (cpu_has_feature(CPU_FTR_HVMODE))
 		return 0;
 
-	while ((np = of_find_compatible_node(np, NULL,
-				     "ibm,coherent-platform-facility"))) {
+	for_each_compatible_node(np, NULL, "ibm,coherent-platform-facility") {
 		dev = of_platform_device_create(np, NULL, NULL);
 		if (dev)
 			count++;

Re: [PATCH -next] cxl: Use for_each_compatible_node() macro

From: Andrew Donnellan <hidden>
Date: 2016-07-12 23:12:38

On 12/07/16 21:30, weiyj_lk@163.com wrote:
From: Wei Yongjun <redacted>

Use for_each_compatible_node() macro instead of open coding it.

Generated by Coccinelle.

Signed-off-by: Wei Yongjun <redacted>
Reviewed-by: Andrew Donnellan <redacted>

-- 
Andrew Donnellan              OzLabs, ADL Canberra
andrew.donnellan@au1.ibm.com  IBM Australia Limited

Re: [PATCH -next] cxl: Use for_each_compatible_node() macro

From: Ian Munsie <hidden>
Date: 2016-07-13 21:28:07

Acked-by: Ian Munsie <redacted>

Re: [-next] cxl: Use for_each_compatible_node() macro

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2016-07-15 10:53:10

On Tue, 2016-12-07 at 11:30:11 UTC, weiyj_lk@163.com wrote:
From: Wei Yongjun <redacted>

Use for_each_compatible_node() macro instead of open coding it.

Generated by Coccinelle.

Signed-off-by: Wei Yongjun <redacted>
Reviewed-by: Andrew Donnellan <redacted>
Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/fc9f75ef2fdf46fc859b991dbf

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help