Re: [PATCH] OMAP: fix fncpy API call

2011-01-25 Thread Jean Pihet
On Tue, Jan 25, 2011 at 6:30 PM, Dave Martin  wrote:
> On Tue, Jan 25, 2011 at 5:21 PM,   wrote:
>> From: Jean Pihet 
>>
>> Fix a potential problem with function types when calling the
>> fncpy API to copy the PM code functions to SRAM.
>>
>> Tested on OMAP3 in low power modes (RET/OFF)
>> using omap2plus_defconfig with !CONFIG_THUMB2_KERNEL.
>>
>> Signed-off-by: Jean Pihet 
>> ---
>>  arch/arm/plat-omap/include/plat/sram.h |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/arch/arm/plat-omap/include/plat/sram.h 
>> b/arch/arm/plat-omap/include/plat/sram.h
>> index d673f2c..6a2166d 100644
>> --- a/arch/arm/plat-omap/include/plat/sram.h
>> +++ b/arch/arm/plat-omap/include/plat/sram.h
>> @@ -21,7 +21,7 @@ extern void *omap_sram_push_address(unsigned long size);
>>        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);    \
>
> If you're doing this, you should also have typeof(&(funcp)) above.
Doh! :p

Let me submit a new version asap.

Jean

>
> Cheers
> ---Dave
>
>>        _res;                                                   \
>>  })
>>
>> --
>> 1.7.1
>>
>>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] OMAP: fix fncpy API call

2011-01-25 Thread Dave Martin
On Tue, Jan 25, 2011 at 5:21 PM,   wrote:
> From: Jean Pihet 
>
> Fix a potential problem with function types when calling the
> fncpy API to copy the PM code functions to SRAM.
>
> Tested on OMAP3 in low power modes (RET/OFF)
> using omap2plus_defconfig with !CONFIG_THUMB2_KERNEL.
>
> Signed-off-by: Jean Pihet 
> ---
>  arch/arm/plat-omap/include/plat/sram.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/plat-omap/include/plat/sram.h 
> b/arch/arm/plat-omap/include/plat/sram.h
> index d673f2c..6a2166d 100644
> --- a/arch/arm/plat-omap/include/plat/sram.h
> +++ b/arch/arm/plat-omap/include/plat/sram.h
> @@ -21,7 +21,7 @@ extern void *omap_sram_push_address(unsigned long size);
>        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);    \

If you're doing this, you should also have typeof(&(funcp)) above.

Cheers
---Dave

>        _res;                                                   \
>  })
>
> --
> 1.7.1
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html