linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jon Hunter <jon-hunter@ti.com>
To: Pantelis Antoniou <panto@antoniou-consulting.com>
Cc: Tony Lindgren <tony@atomide.com>,
	Stephen Warren <swarren@wwwdotorg.org>,
	Benoit Cousson <b-cousson@ti.com>,
	linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org,
	Matt Porter <mporter@ti.com>, Russ Dill <Russ.Dill@ti.com>,
	Koen Kooi <koen@dominion.thruhere.net>,
	Joel A Fernandes <agnel.joel@gmail.com>,
	Rob Clark <robdclark@gmail.com>,
	Jason Kridner <jkridner@beagleboard.org>,
	Matt Ranostay <mranostay@gmail.com>
Subject: Re: [PATCH] omap: DT node Timer iteration fix
Date: Wed, 9 Jan 2013 16:12:52 -0600	[thread overview]
Message-ID: <50EDEB64.4060800@ti.com> (raw)
In-Reply-To: <1357651902-21966-1-git-send-email-panto@antoniou-consulting.com>

Hi Pantelis,

On 01/08/2013 07:31 AM, Pantelis Antoniou wrote:
> The iterator correctly handles of_node_put() calls.
> Remove it before continue'ing the loop.
> Without this patch you get:

Thanks for the fix!

May be worth mentioning that this will only be seen with
"CONFIG_OF_DYNAMIC" (and explains why I did not catch this one!).

> ERROR: Bad of_node_put() on /ocp/timer@44e31000!
> [<c001329c>] (unwind_backtrace+0x0/0xe0) from [<c03dd8f0>] (of_node_release+0x2c/0xa0)!
> [<c03dd8f0>] (of_node_release+0x2c/0xa0) from [<c03ddea0>] (of_find_matching_node_and_match+0x78/0x90)!
> [<c03ddea0>] (of_find_matching_node_and_match+0x78/0x90) from [<c06d349c>] (omap_get_timer_dt+0x78/0x90)!
> [<c06d349c>] (omap_get_timer_dt+0x78/0x90) from [<c06d3664>] (omap_dm_timer_init_one.clone.2+0x34/0x2bc)!
> [<c06d3664>] (omap_dm_timer_init_one.clone.2+0x34/0x2bc) from [<c06d3a2c>] (omap2_gptimer_clocksource_init.clone.4+0x24/0xa8)!
> [<c06d3a2c>] (omap2_gptimer_clocksource_init.clone.4+0x24/0xa8) from [<c06cca58>] (time_init+0x20/0x30)!
> [<c06cca58>] (time_init+0x20/0x30) from [<c06c9690>] (start_kernel+0x1a8/0x2fc)!
> 
> Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
> ---
>  arch/arm/mach-omap2/timer.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
> index 691aa67..b8ad6e6 100644
> --- a/arch/arm/mach-omap2/timer.c
> +++ b/arch/arm/mach-omap2/timer.c
> @@ -165,15 +165,11 @@ static struct device_node * __init omap_get_timer_dt(struct of_device_id *match,
>  	struct device_node *np;
>  
>  	for_each_matching_node(np, match) {
> -		if (!of_device_is_available(np)) {
> -			of_node_put(np);
> +		if (!of_device_is_available(np))
>  			continue;
> -		}
>  
> -		if (property && !of_get_property(np, property, NULL)) {
> -			of_node_put(np);
> +		if (property && !of_get_property(np, property, NULL))
>  			continue;
> -		}
>  
>  		of_add_property(np, &device_disabled);
>  		return np;

Otherwise ...

Acked-by: Jon Hunter <jon-hunter@ti.com>

Cheers
Jon

  reply	other threads:[~2013-01-09 22:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-08 13:31 [PATCH] omap: DT node Timer iteration fix Pantelis Antoniou
2013-01-09 22:12 ` Jon Hunter [this message]
2013-01-21 18:37   ` Tony Lindgren

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=50EDEB64.4060800@ti.com \
    --to=jon-hunter@ti.com \
    --cc=Russ.Dill@ti.com \
    --cc=agnel.joel@gmail.com \
    --cc=b-cousson@ti.com \
    --cc=jkridner@beagleboard.org \
    --cc=koen@dominion.thruhere.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=mporter@ti.com \
    --cc=mranostay@gmail.com \
    --cc=panto@antoniou-consulting.com \
    --cc=robdclark@gmail.com \
    --cc=swarren@wwwdotorg.org \
    --cc=tony@atomide.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).