All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Jon Hunter <jgchunter@gmail.com>
Cc: Afzal Mohammed <afzal@ti.com>,
	linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Russell King <linux@arm.linux.org.uk>
Subject: Re: [PATCH] ARM: OMAP2+: timer: initialize before using oh_name
Date: Thu, 4 Jul 2013 04:47:37 -0700	[thread overview]
Message-ID: <20130704114736.GC5523@atomide.com> (raw)
In-Reply-To: <51A51FAC.5090606@gmail.com>

* Jon Hunter <jgchunter@gmail.com> [130528 14:26]:
> 
> On 28/05/13 07:24, Afzal Mohammed wrote:
> > of_property_read_string_index(...,&oh_name) in omap_dm_timer_init_one
> > does not alter the value of 'oh_name' even if the relevant function
> > fails and as 'oh_name' in stack may have a non-zero value, it would
> > be misunderstood by timer code that DT has specified "ti,hwmod"
> > property for timer. 'oh_name' in this scenario would be a junk value,
> > this would result in module not being enabled by hwmod API's for
> > timer, and in turn crash.
> > 
> > Signed-off-by: Afzal Mohammed <afzal@ti.com>
> > ---
> >  arch/arm/mach-omap2/timer.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
> > index f8b23b8..8e0c390 100644
> > --- a/arch/arm/mach-omap2/timer.c
> > +++ b/arch/arm/mach-omap2/timer.c
> > @@ -220,7 +220,7 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
> >  					 int posted)
> >  {
> >  	char name[10]; /* 10 = sizeof("gptXX_Xck0") */
> > -	const char *oh_name;
> > +	const char *oh_name = NULL;
> >  	struct device_node *np;
> >  	struct omap_hwmod *oh;
> >  	struct resource irq, mem;
> 
> Thanks!
> 
> Acked-by: Jon Hunter <jgchunter@gmail.com>

Thanks, applying into omap-for-v3.11/fixes.

Tony 

WARNING: multiple messages have this Message-ID (diff)
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: OMAP2+: timer: initialize before using oh_name
Date: Thu, 4 Jul 2013 04:47:37 -0700	[thread overview]
Message-ID: <20130704114736.GC5523@atomide.com> (raw)
In-Reply-To: <51A51FAC.5090606@gmail.com>

* Jon Hunter <jgchunter@gmail.com> [130528 14:26]:
> 
> On 28/05/13 07:24, Afzal Mohammed wrote:
> > of_property_read_string_index(...,&oh_name) in omap_dm_timer_init_one
> > does not alter the value of 'oh_name' even if the relevant function
> > fails and as 'oh_name' in stack may have a non-zero value, it would
> > be misunderstood by timer code that DT has specified "ti,hwmod"
> > property for timer. 'oh_name' in this scenario would be a junk value,
> > this would result in module not being enabled by hwmod API's for
> > timer, and in turn crash.
> > 
> > Signed-off-by: Afzal Mohammed <afzal@ti.com>
> > ---
> >  arch/arm/mach-omap2/timer.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
> > index f8b23b8..8e0c390 100644
> > --- a/arch/arm/mach-omap2/timer.c
> > +++ b/arch/arm/mach-omap2/timer.c
> > @@ -220,7 +220,7 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
> >  					 int posted)
> >  {
> >  	char name[10]; /* 10 = sizeof("gptXX_Xck0") */
> > -	const char *oh_name;
> > +	const char *oh_name = NULL;
> >  	struct device_node *np;
> >  	struct omap_hwmod *oh;
> >  	struct resource irq, mem;
> 
> Thanks!
> 
> Acked-by: Jon Hunter <jgchunter@gmail.com>

Thanks, applying into omap-for-v3.11/fixes.

Tony 

  reply	other threads:[~2013-07-04 11:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-28  6:24 [PATCH] ARM: OMAP2+: timer: initialize before using oh_name Afzal Mohammed
2013-05-28  6:24 ` Afzal Mohammed
2013-05-28  6:24 ` Afzal Mohammed
2013-05-28 21:20 ` Jon Hunter
2013-05-28 21:20   ` Jon Hunter
2013-07-04 11:47   ` Tony Lindgren [this message]
2013-07-04 11:47     ` 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=20130704114736.GC5523@atomide.com \
    --to=tony@atomide.com \
    --cc=afzal@ti.com \
    --cc=jgchunter@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.