All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] video: fbdev: offb: switch to using for_each_node_by_type
@ 2017-01-31 18:25   ` Dmitry Torokhov
  0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2017-01-31 18:25 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz
  Cc: Tomi Valkeinen, Yongji Xie, linux-fbdev, linux-kernel

Instead of open-coding loops let's switch to a nice macro.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 drivers/video/fbdev/offb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/video/fbdev/offb.c b/drivers/video/fbdev/offb.c
index 906c6e75c260..9be884b0c778 100644
--- a/drivers/video/fbdev/offb.c
+++ b/drivers/video/fbdev/offb.c
@@ -668,14 +668,14 @@ static int __init offb_init(void)
 		offb_init_nodriver(of_chosen, 1);
 	}
 
-	for (dp = NULL; (dp = of_find_node_by_type(dp, "display"));) {
+	for_each_node_by_type(dp, "display") {
 		if (of_get_property(dp, "linux,opened", NULL) &&
 		    of_get_property(dp, "linux,boot-display", NULL)) {
 			boot_disp = dp;
 			offb_init_nodriver(dp, 0);
 		}
 	}
-	for (dp = NULL; (dp = of_find_node_by_type(dp, "display"));) {
+	for_each_node_by_type(dp, "display") {
 		if (of_get_property(dp, "linux,opened", NULL) &&
 		    dp != boot_disp)
 			offb_init_nodriver(dp, 0);
-- 
2.11.0.483.g087da7b7c-goog


-- 
Dmitry

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] video: fbdev: offb: switch to using for_each_node_by_type
@ 2017-01-31 18:25   ` Dmitry Torokhov
  0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2017-01-31 18:25 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz
  Cc: Tomi Valkeinen, Yongji Xie, linux-fbdev, linux-kernel

Instead of open-coding loops let's switch to a nice macro.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 drivers/video/fbdev/offb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/video/fbdev/offb.c b/drivers/video/fbdev/offb.c
index 906c6e75c260..9be884b0c778 100644
--- a/drivers/video/fbdev/offb.c
+++ b/drivers/video/fbdev/offb.c
@@ -668,14 +668,14 @@ static int __init offb_init(void)
 		offb_init_nodriver(of_chosen, 1);
 	}
 
-	for (dp = NULL; (dp = of_find_node_by_type(dp, "display"));) {
+	for_each_node_by_type(dp, "display") {
 		if (of_get_property(dp, "linux,opened", NULL) &&
 		    of_get_property(dp, "linux,boot-display", NULL)) {
 			boot_disp = dp;
 			offb_init_nodriver(dp, 0);
 		}
 	}
-	for (dp = NULL; (dp = of_find_node_by_type(dp, "display"));) {
+	for_each_node_by_type(dp, "display") {
 		if (of_get_property(dp, "linux,opened", NULL) &&
 		    dp != boot_disp)
 			offb_init_nodriver(dp, 0);
-- 
2.11.0.483.g087da7b7c-goog


-- 
Dmitry

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] video: fbdev: offb: switch to using for_each_node_by_type
  2017-01-31 18:25   ` Dmitry Torokhov
@ 2017-02-08 14:47     ` Bartlomiej Zolnierkiewicz
  -1 siblings, 0 replies; 4+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2017-02-08 14:47 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Tomi Valkeinen, Yongji Xie, linux-fbdev, linux-kernel


Hi,

On Tuesday, January 31, 2017 10:25:36 AM Dmitry Torokhov wrote:
> Instead of open-coding loops let's switch to a nice macro.
> 
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

Patch queued for 4.11, thanks.

> ---
>  drivers/video/fbdev/offb.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/video/fbdev/offb.c b/drivers/video/fbdev/offb.c
> index 906c6e75c260..9be884b0c778 100644
> --- a/drivers/video/fbdev/offb.c
> +++ b/drivers/video/fbdev/offb.c
> @@ -668,14 +668,14 @@ static int __init offb_init(void)
>  		offb_init_nodriver(of_chosen, 1);
>  	}
>  
> -	for (dp = NULL; (dp = of_find_node_by_type(dp, "display"));) {
> +	for_each_node_by_type(dp, "display") {
>  		if (of_get_property(dp, "linux,opened", NULL) &&
>  		    of_get_property(dp, "linux,boot-display", NULL)) {
>  			boot_disp = dp;
>  			offb_init_nodriver(dp, 0);
>  		}
>  	}
> -	for (dp = NULL; (dp = of_find_node_by_type(dp, "display"));) {
> +	for_each_node_by_type(dp, "display") {
>  		if (of_get_property(dp, "linux,opened", NULL) &&
>  		    dp != boot_disp)
>  			offb_init_nodriver(dp, 0);

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] video: fbdev: offb: switch to using for_each_node_by_type
@ 2017-02-08 14:47     ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 4+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2017-02-08 14:47 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Tomi Valkeinen, Yongji Xie, linux-fbdev, linux-kernel


Hi,

On Tuesday, January 31, 2017 10:25:36 AM Dmitry Torokhov wrote:
> Instead of open-coding loops let's switch to a nice macro.
> 
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

Patch queued for 4.11, thanks.

> ---
>  drivers/video/fbdev/offb.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/video/fbdev/offb.c b/drivers/video/fbdev/offb.c
> index 906c6e75c260..9be884b0c778 100644
> --- a/drivers/video/fbdev/offb.c
> +++ b/drivers/video/fbdev/offb.c
> @@ -668,14 +668,14 @@ static int __init offb_init(void)
>  		offb_init_nodriver(of_chosen, 1);
>  	}
>  
> -	for (dp = NULL; (dp = of_find_node_by_type(dp, "display"));) {
> +	for_each_node_by_type(dp, "display") {
>  		if (of_get_property(dp, "linux,opened", NULL) &&
>  		    of_get_property(dp, "linux,boot-display", NULL)) {
>  			boot_disp = dp;
>  			offb_init_nodriver(dp, 0);
>  		}
>  	}
> -	for (dp = NULL; (dp = of_find_node_by_type(dp, "display"));) {
> +	for_each_node_by_type(dp, "display") {
>  		if (of_get_property(dp, "linux,opened", NULL) &&
>  		    dp != boot_disp)
>  			offb_init_nodriver(dp, 0);

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-02-08 14:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20170131182541epcas1p402e498825d87444fda8a718daaa59374@epcas1p4.samsung.com>
2017-01-31 18:25 ` [PATCH] video: fbdev: offb: switch to using for_each_node_by_type Dmitry Torokhov
2017-01-31 18:25   ` Dmitry Torokhov
2017-02-08 14:47   ` Bartlomiej Zolnierkiewicz
2017-02-08 14:47     ` Bartlomiej Zolnierkiewicz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.