All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Dave Martin <dave.martin@linaro.org>
Cc: jean.pihet@newoldbits.com, linux-omap@vger.kernel.org,
	Jean Pihet <j-pihet@ti.com>
Subject: Re: [PATCH v2] OMAP: fix fncpy API call
Date: Tue, 1 Feb 2011 16:01:17 -0800	[thread overview]
Message-ID: <20110202000116.GM3358@atomide.com> (raw)
In-Reply-To: <AANLkTinU5Msop=Lg7iuSfNZXa+7NQCwcrN2hB1a1T9Ds@mail.gmail.com>

* Dave Martin <dave.martin@linaro.org> [110201 08:34]:
> On Tue, Jan 25, 2011 at 5:48 PM,  <jean.pihet@newoldbits.com> wrote:
> > From: Jean Pihet <j-pihet@ti.com>
> >
> > Fix a potential problem with function types when calling the
> > fncpy API to copy the PM code functions to SRAM.
> >
> > Signed-off-by: Jean Pihet <j-pihet@ti.com>
> > ---
> >  arch/arm/plat-omap/include/plat/sram.h |    4 ++--
> >  1 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/arm/plat-omap/include/plat/sram.h b/arch/arm/plat-omap/include/plat/sram.h
> > index d673f2c..f500fc3 100644
> > --- a/arch/arm/plat-omap/include/plat/sram.h
> > +++ b/arch/arm/plat-omap/include/plat/sram.h
> > @@ -18,10 +18,10 @@ extern void *omap_sram_push_address(unsigned long size);
> >
> >  /* Macro to push a function to the internal SRAM, using the fncpy API */
> >  #define omap_sram_push(funcp, size) ({                         \
> > -       typeof(&funcp) _res = NULL;                             \
> > +       typeof(&(funcp)) _res = NULL;                           \
> >        void *_sram_address = omap_sram_push_address(size);     \
> >        if (_sram_address)                                      \
> > -               _res = fncpy(_sram_address, &funcp, size);      \
> > +               _res = fncpy(_sram_address, &(funcp), size);    \
> >        _res;                                                   \
> >  })
> 
> I believe this is sound, though I'm not yet in a position to test it fully.
> 
> When I have the OMAP kernel building with Thumb-2 again I will follow up.
> 
> Cheers
> ---Dave
> 
> 
> Reviewed-by: Dave Martin <dave.martin@linaro.org>

Looks good to me too:

Acked-by: Tony Lindgren <tony@atomide.com>

I'll add this to omap-testing branch, but as Russell has this queued,
you'll have to send this to him on linux-arm-kernel list.

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2011-02-02  0:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-25 17:48 [PATCH v2] OMAP: fix fncpy API call jean.pihet
2011-02-01  9:37 ` Jean Pihet
2011-02-01 16:36 ` Dave Martin
2011-02-02  0:01   ` Tony Lindgren [this message]
2011-02-02 14:48     ` Jean Pihet

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=20110202000116.GM3358@atomide.com \
    --to=tony@atomide.com \
    --cc=dave.martin@linaro.org \
    --cc=j-pihet@ti.com \
    --cc=jean.pihet@newoldbits.com \
    --cc=linux-omap@vger.kernel.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 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.