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] [thread-next>] [day] [month] [year] [list]
Message-ID: <35240162.ybqbYegqRc@avalon>
Date:	Wed, 20 Aug 2014 22:17:46 +0200
From:	Laurent Pinchart <laurent.pinchart@...asonboard.com>
To:	Philipp Zabel <p.zabel@...gutronix.de>
Cc:	linux-kernel@...r.kernel.org, linux-media@...r.kernel.org,
	devel@...verdev.osuosl.org, Grant Likely <grant.likely@...aro.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Guennadi Liakhovetski <g.liakhovetski@....de>,
	Mauro Carvalho Chehab <m.chehab@...sung.com>,
	Russell King <rmk+kernel@....linux.org.uk>,
	kernel@...gutronix.de
Subject: Re: [PATCH 6/8] drm: use for_each_endpoint_of_node macro in drm_of_find_possible_crtcs

Hi Philipp,

Thank you for the patch.

On Tuesday 19 August 2014 15:02:44 Philipp Zabel wrote:
> Using the for_each_... macro should make the code a bit shorter and
> easier to read.
> 
> Signed-off-by: Philipp Zabel <p.zabel@...gutronix.de>

Acked-by: Laurent Pinchart <laurent.pinchart@...asonboard.com>

> ---
>  drivers/gpu/drm/drm_of.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c
> index 16150a0..024fa77 100644
> --- a/drivers/gpu/drm/drm_of.c
> +++ b/drivers/gpu/drm/drm_of.c
> @@ -46,11 +46,7 @@ uint32_t drm_of_find_possible_crtcs(struct drm_device
> *dev, struct device_node *remote_port, *ep = NULL;
>  	uint32_t possible_crtcs = 0;
> 
> -	do {
> -		ep = of_graph_get_next_endpoint(port, ep);
> -		if (!ep)
> -			break;
> -
> +	for_each_endpoint_of_node(port, ep) {
>  		remote_port = of_graph_get_remote_port(ep);
>  		if (!remote_port) {
>  			of_node_put(ep);
> @@ -60,7 +56,7 @@ uint32_t drm_of_find_possible_crtcs(struct drm_device
> *dev, possible_crtcs |= drm_crtc_port_mask(dev, remote_port);
> 
>  		of_node_put(remote_port);
> -	} while (1);
> +	}
> 
>  	return possible_crtcs;
>  }

-- 
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ