Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1441273 > unrolled thread
| Started by | weiyj_lk@163.com |
|---|---|
| First post | 2016-07-12 13:40 +0200 |
| Last post | 2016-07-15 13:00 +0200 |
| Articles | 4 — 4 participants |
Back to article view | Back to linux.kernel
[PATCH -next] cxl: Use for_each_compatible_node() macro weiyj_lk@163.com - 2016-07-12 13:40 +0200
Re: [PATCH -next] cxl: Use for_each_compatible_node() macro Andrew Donnellan <andrew.donnellan@au1.ibm.com> - 2016-07-13 01:20 +0200
Re: [PATCH -next] cxl: Use for_each_compatible_node() macro Ian Munsie <imunsie@au1.ibm.com> - 2016-07-13 23:30 +0200
Re: [-next] cxl: Use for_each_compatible_node() macro Michael Ellerman <mpe@ellerman.id.au> - 2016-07-15 13:00 +0200
| From | weiyj_lk@163.com |
|---|---|
| Date | 2016-07-12 13:40 +0200 |
| Subject | [PATCH -next] cxl: Use for_each_compatible_node() macro |
| Message-ID | <rU4cG-4gU-33@gated-at.bofh.it> |
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++;
[toc] | [next] | [standalone]
| From | Andrew Donnellan <andrew.donnellan@au1.ibm.com> |
|---|---|
| Date | 2016-07-13 01:20 +0200 |
| Message-ID | <rUf85-3eh-1@gated-at.bofh.it> |
| In reply to | #1441273 |
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
[toc] | [prev] | [next] | [standalone]
| From | Ian Munsie <imunsie@au1.ibm.com> |
|---|---|
| Date | 2016-07-13 23:30 +0200 |
| Message-ID | <rUzTc-b7-23@gated-at.bofh.it> |
| In reply to | #1441273 |
Acked-by: Ian Munsie <imunsie@au1.ibm.com>
[toc] | [prev] | [next] | [standalone]
| From | Michael Ellerman <mpe@ellerman.id.au> |
|---|---|
| Date | 2016-07-15 13:00 +0200 |
| Subject | Re: [-next] cxl: Use for_each_compatible_node() macro |
| Message-ID | <rV90C-5RX-33@gated-at.bofh.it> |
| In reply to | #1441273 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web