linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: sboyd@codeaurora.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/5] clk: imx31: add missing of_node_put
Date: Wed, 21 Oct 2015 16:15:46 -0700	[thread overview]
Message-ID: <20151021231546.GK19782@codeaurora.org> (raw)
In-Reply-To: <1445460100-26727-5-git-send-email-Julia.Lawall@lip6.fr>

On 10/21, Julia Lawall wrote:
> for_each_compatible_node performs an of_node_get on each iteration, so a
> break out of the loop requires an of_node_put.
> 
> The semantic patch that fixes this problem is as follows
> (http://coccinelle.lip6.fr):
> 
> // <smpl>
> @@
> local idexpression n;
> expression e;
> @@
> 
>  for_each_compatible_node(n,...) {
>    ...
> (
>    of_node_put(n);
> |
>    e = n
> |
> +  of_node_put(n);
> ?  break;
> )
>    ...
>  }
> ... when != n
> // </smpl>
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
> 
> ---

Applied to clk-next

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

  reply	other threads:[~2015-10-21 23:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-21 20:41 [PATCH 0/5] add missing of_node_put Julia Lawall
2015-10-21 20:41 ` [PATCH 3/5] clk: imx27: " Julia Lawall
2015-10-21 23:15   ` Stephen Boyd
2015-10-21 20:41 ` [PATCH 4/5] clk: imx31: " Julia Lawall
2015-10-21 23:15   ` Stephen Boyd [this message]
2015-10-21 20:41 ` [PATCH 5/5] clk: scpi: " Julia Lawall
2015-10-21 23:17   ` Stephen Boyd
2015-10-22  9:21   ` Sudeep Holla
2015-11-26 17:29     ` Sudeep Holla
2015-12-01  0:28       ` Stephen Boyd
2015-12-01  0:29   ` Stephen Boyd

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151021231546.GK19782@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).