* [PATCH -next] cxl: Use for_each_compatible_node() macro
@ 2016-07-12 11:30 weiyj_lk
2016-07-12 23:12 ` Andrew Donnellan
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: weiyj_lk @ 2016-07-12 11:30 UTC (permalink / raw)
To: Ian Munsie, Michael Neuling; +Cc: Wei Yongjun, linuxppc-dev, linux-kernel
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Use for_each_compatible_node() macro instead of open coding it.
Generated by Coccinelle.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
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++;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH -next] cxl: Use for_each_compatible_node() macro
2016-07-12 11:30 [PATCH -next] cxl: Use for_each_compatible_node() macro weiyj_lk
@ 2016-07-12 23:12 ` Andrew Donnellan
2016-07-13 21:27 ` Ian Munsie
2016-07-15 10:53 ` [-next] " Michael Ellerman
2 siblings, 0 replies; 4+ messages in thread
From: Andrew Donnellan @ 2016-07-12 23:12 UTC (permalink / raw)
To: weiyj_lk, Ian Munsie, Michael Neuling
Cc: Wei Yongjun, linuxppc-dev, linux-kernel
On 12/07/16 21:30, weiyj_lk@163.com wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Use for_each_compatible_node() macro instead of open coding it.
>
> Generated by Coccinelle.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
--
Andrew Donnellan OzLabs, ADL Canberra
andrew.donnellan@au1.ibm.com IBM Australia Limited
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -next] cxl: Use for_each_compatible_node() macro
2016-07-12 11:30 [PATCH -next] cxl: Use for_each_compatible_node() macro weiyj_lk
2016-07-12 23:12 ` Andrew Donnellan
@ 2016-07-13 21:27 ` Ian Munsie
2016-07-15 10:53 ` [-next] " Michael Ellerman
2 siblings, 0 replies; 4+ messages in thread
From: Ian Munsie @ 2016-07-13 21:27 UTC (permalink / raw)
To: weiyj_lk; +Cc: Michael Neuling, Wei Yongjun, linuxppc-dev, linux-kernel
Acked-by: Ian Munsie <imunsie@au1.ibm.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [-next] cxl: Use for_each_compatible_node() macro
2016-07-12 11:30 [PATCH -next] cxl: Use for_each_compatible_node() macro weiyj_lk
2016-07-12 23:12 ` Andrew Donnellan
2016-07-13 21:27 ` Ian Munsie
@ 2016-07-15 10:53 ` Michael Ellerman
2 siblings, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2016-07-15 10:53 UTC (permalink / raw)
To: weiyj_lk, Ian Munsie, Michael Neuling
Cc: Wei Yongjun, linuxppc-dev, linux-kernel
On Tue, 2016-12-07 at 11:30:11 UTC, weiyj_lk@163.com wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Use for_each_compatible_node() macro instead of open coding it.
>
> Generated by Coccinelle.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/fc9f75ef2fdf46fc859b991dbf
cheers
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-07-15 10:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-12 11:30 [PATCH -next] cxl: Use for_each_compatible_node() macro weiyj_lk
2016-07-12 23:12 ` Andrew Donnellan
2016-07-13 21:27 ` Ian Munsie
2016-07-15 10:53 ` [-next] " Michael Ellerman
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).