* [PATCH v2] OMAP: fix fncpy API call
@ 2011-01-25 17:48 jean.pihet
2011-02-01 9:37 ` Jean Pihet
2011-02-01 16:36 ` Dave Martin
0 siblings, 2 replies; 5+ messages in thread
From: jean.pihet @ 2011-01-25 17:48 UTC (permalink / raw)
To: Dave Martin, linux-omap; +Cc: Jean Pihet
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; \
})
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] OMAP: fix fncpy API call
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
1 sibling, 0 replies; 5+ messages in thread
From: Jean Pihet @ 2011-02-01 9:37 UTC (permalink / raw)
To: Dave Martin, linux-omap, Tony Lindgren; +Cc: Jean Pihet
On Tue, Jan 25, 2011 at 6: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; \
> })
>
Dave, Tony,
Are you OK with this version?
If so can it added to the tree? It is a follow-up of commit
021222e9988acbf3bb6fabffc667bab0bb207c54
'omap: use fncpy to copy the PM code functions to SRAM'.
Thanks,
Jean
> --
> 1.7.1
>
>
--
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] OMAP: fix fncpy API call
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
1 sibling, 1 reply; 5+ messages in thread
From: Dave Martin @ 2011-02-01 16:36 UTC (permalink / raw)
To: jean.pihet; +Cc: linux-omap, Jean Pihet
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>
>
> --
> 1.7.1
>
>
--
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] OMAP: fix fncpy API call
2011-02-01 16:36 ` Dave Martin
@ 2011-02-02 0:01 ` Tony Lindgren
2011-02-02 14:48 ` Jean Pihet
0 siblings, 1 reply; 5+ messages in thread
From: Tony Lindgren @ 2011-02-02 0:01 UTC (permalink / raw)
To: Dave Martin; +Cc: jean.pihet, linux-omap, Jean Pihet
* 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] OMAP: fix fncpy API call
2011-02-02 0:01 ` Tony Lindgren
@ 2011-02-02 14:48 ` Jean Pihet
0 siblings, 0 replies; 5+ messages in thread
From: Jean Pihet @ 2011-02-02 14:48 UTC (permalink / raw)
To: Tony Lindgren; +Cc: Dave Martin, linux-omap, Jean Pihet
On Wed, Feb 2, 2011 at 1:01 AM, Tony Lindgren <tony@atomide.com> wrote:
> * 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>
Ok thanks!
>
> 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.
I have folded the 2 original patches code and acks into '[PATCH] omap:
use fncpy to copy the PM code functions to SRAM' and re-sent to l-a-k
and l-o MLs.
Also submitted to Russell's patch system.
>
> Regards,
>
> Tony
>
Regards,
Jean
--
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-02-02 14:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2011-02-02 14:48 ` Jean Pihet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox