public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Felipe Balbi <felipe.balbi@nokia.com>
Cc: Tero Kristo <tero.kristo@nokia.com>, linux-omap@vger.kernel.org
Subject: Re: [PATCH] Fixed OMAP3 version check
Date: Thu, 25 Sep 2008 13:31:21 +0300	[thread overview]
Message-ID: <20080925103120.GI5222@atomide.com> (raw)
In-Reply-To: <20080925102331.GC24627@gandalf.research.nokia.com>

* Felipe Balbi <felipe.balbi@nokia.com> [080925 13:24]:
> On Thu, Sep 25, 2008 at 01:17:51PM +0300, Tony Lindgren wrote:
> > Hi,
> > 
> > * Tero Kristo <tero.kristo@nokia.com> [080916 14:59]:
> > > CPU version was reported incorrectly (e.g. ES3.0 instead of ES2.1.)
> > > Also added a piece of optimization for CPU type check (omap_type()).
> > > 
> > > Signed-off-by: Tero Kristo <tero.kristo@nokia.com>
> > > ---
> > >  arch/arm/mach-omap2/id.c |    7 +++++--
> > >  1 files changed, 5 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
> > > index ab7a6e9..4e2b449 100644
> > > --- a/arch/arm/mach-omap2/id.c
> > > +++ b/arch/arm/mach-omap2/id.c
> > > @@ -37,7 +37,10 @@ EXPORT_SYMBOL(omap_chip_is);
> > >  
> > >  int omap_type(void)
> > >  {
> > > -	u32 val = 0;
> > > +	static u32 val;
> > > +
> > > +	if (val != 0)
> > > +		return val;
> > 
> > Hmm I guess this would return a random val? :)
> 
> it would return 0, look that val is static.

Ah, sorry I did not see the static. So this is to cache the result
to optimize it? I'd assume this function is only needed during some
init code hopefully where performance does not matter..

Tony

  reply	other threads:[~2008-09-25 10:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-16 13:46 OMAP3 CPU revision fix Tero Kristo
2008-09-16 13:46 ` [PATCH] Fixed OMAP3 version check Tero Kristo
2008-09-25 10:17   ` Tony Lindgren
2008-09-25 10:23     ` Felipe Balbi
2008-09-25 10:31       ` Tony Lindgren [this message]
2008-09-25 11:41         ` Felipe Balbi
2008-09-25 11:45           ` Tero.Kristo
2008-09-25 11:47             ` Tony Lindgren
2008-09-25 11:49               ` Tony Lindgren
2008-09-25 12:10                 ` Tero.Kristo
2008-09-25 12:10     ` Tero.Kristo
2008-09-25 12:18       ` 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=20080925103120.GI5222@atomide.com \
    --to=tony@atomide.com \
    --cc=felipe.balbi@nokia.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=tero.kristo@nokia.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