linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@codeaurora.org>
To: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: Shawn Guo <shawnguo@kernel.org>,
	kernel-janitors@vger.kernel.org,
	Sascha Hauer <kernel@pengutronix.de>,
	Michael Turquette <mturquette@baylibre.com>,
	linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Russell King - ARM Linux <linux@arm.linux.org.uk>,
	Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	Andrew Lunn <andrew@lunn.ch>, Bjorn Helgaas <bhelgaas@google.com>,
	Jason Cooper <jason@lakedaemon.net>
Subject: Re: [PATCH 3/5] clk: imx27: add missing of_node_put
Date: Wed, 21 Oct 2015 16:15:28 -0700	[thread overview]
Message-ID: <20151021231528.GJ19782@codeaurora.org> (raw)
In-Reply-To: <1445460100-26727-4-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: 16+ 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 1/5] clk: " Julia Lawall
2015-10-21 23:13   ` Stephen Boyd
2015-10-22  5:52     ` Julia Lawall
2015-10-21 20:41 ` [PATCH 2/5] clk: si5351: " Julia Lawall
2015-10-21 23:14   ` Stephen Boyd
2015-10-21 20:41 ` [PATCH 3/5] clk: imx27: " Julia Lawall
2015-10-21 23:15   ` Stephen Boyd [this message]
2015-10-21 20:41 ` [PATCH 4/5] clk: imx31: " Julia Lawall
2015-10-21 23:15   ` Stephen Boyd
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=20151021231528.GJ19782@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=Julia.Lawall@lip6.fr \
    --cc=andrew@lunn.ch \
    --cc=bhelgaas@google.com \
    --cc=jason@lakedaemon.net \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mturquette@baylibre.com \
    --cc=shawnguo@kernel.org \
    --cc=thomas.petazzoni@free-electrons.com \
    /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).