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  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]
Date:	Mon, 22 Dec 2014 14:09:46 -0700
From:	Mathieu Poirier <mathieu.poirier@...aro.org>
To:	Philipp Zabel <p.zabel@...gutronix.de>
Cc:	Grant Likely <grant.likely@...aro.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	linux-media@...r.kernel.org, dri-devel@...ts.freedesktop.org,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	Guennadi Liakhovetski <g.liakhovetski@....de>,
	Laurent Pinchart <laurent.pinchart@...asonboard.com>,
	David Airlie <airlied@...ux.ie>,
	Mauro Carvalho Chehab <m.chehab@...sung.com>,
	Russell King <rmk+kernel@....linux.org.uk>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	kernel@...gutronix.de
Subject: Re: [PATCH v6 1/3] of: Decrement refcount of previous endpoint in of_graph_get_next_endpoint

On 22 December 2014 at 08:11, Philipp Zabel <p.zabel@...gutronix.de> wrote:
> Decrementing the reference count of the previous endpoint node allows to
> use the of_graph_get_next_endpoint function in a for_each_... style macro.
> All current users of this function that pass a non-NULL prev parameter
> (that is, soc_camera and imx-drm) are changed to not decrement the passed
> prev argument's refcount themselves.
>
> Signed-off-by: Philipp Zabel <p.zabel@...gutronix.de>
> Acked-by: Mauro Carvalho Chehab <mchehab@....samsung.com>
> ---
> Changes since v5:
>  - Rebased onto v3.19-rc1
>  - Added coresight and rcar-du
> ---
>  drivers/coresight/of_coresight.c               | 13 ++-----------
>  drivers/gpu/drm/imx/imx-drm-core.c             | 13 ++-----------
>  drivers/gpu/drm/rcar-du/rcar_du_kms.c          | 15 ++++-----------
>  drivers/media/platform/soc_camera/soc_camera.c |  3 ++-
>  drivers/of/base.c                              |  9 +--------
>  5 files changed, 11 insertions(+), 42 deletions(-)
>
> diff --git a/drivers/coresight/of_coresight.c b/drivers/coresight/of_coresight.c
> index 5030c07..349c88b 100644
> --- a/drivers/coresight/of_coresight.c
> +++ b/drivers/coresight/of_coresight.c
> @@ -52,15 +52,6 @@ of_coresight_get_endpoint_device(struct device_node *endpoint)
>                                endpoint, of_dev_node_match);
>  }
>
> -static struct device_node *of_get_coresight_endpoint(
> -               const struct device_node *parent, struct device_node *prev)
> -{
> -       struct device_node *node = of_graph_get_next_endpoint(parent, prev);
> -
> -       of_node_put(prev);
> -       return node;
> -}
> -
>  static void of_coresight_get_ports(struct device_node *node,
>                                    int *nr_inport, int *nr_outport)
>  {
> @@ -68,7 +59,7 @@ static void of_coresight_get_ports(struct device_node *node,
>         int in = 0, out = 0;
>
>         do {
> -               ep = of_get_coresight_endpoint(node, ep);
> +               ep = of_graph_get_next_endpoint(node, ep);
>                 if (!ep)
>                         break;
>
> @@ -140,7 +131,7 @@ struct coresight_platform_data *of_get_coresight_platform_data(
>                 /* Iterate through each port to discover topology */
>                 do {
>                         /* Get a handle on a port */
> -                       ep = of_get_coresight_endpoint(node, ep);
> +                       ep = of_graph_get_next_endpoint(node, ep);
>                         if (!ep)
>                                 break;
>

I tested this in my tree - ack.
--
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