* Dave Martin <dave.martin@xxxxxxxxxx> [110201 08:34]: > On Tue, Jan 25, 2011 at 5:48 PM, <jean.pihet@xxxxxxxxxxxxxx> wrote: > > From: Jean Pihet <j-pihet@xxxxxx> > > > > 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@xxxxxx> > > --- > > Â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@xxxxxxxxxx> Looks good to me too: Acked-by: Tony Lindgren <tony@xxxxxxxxxxx> 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@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html