lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-id: <1492127.1iJfys0tjB@amdc3058>
Date:   Wed, 08 Feb 2017 15:47:38 +0100
From:   Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
To:     Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc:     Tomi Valkeinen <tomi.valkeinen@...com>,
        Yongji Xie <xyjxie@...ux.vnet.ibm.com>,
        linux-fbdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] video: fbdev: offb: switch to using for_each_node_by_type


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@...il.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ