[PATCH] OMAP: use fncpy to copy the PM code functions to SRAM

Russell King - ARM Linux linux at arm.linux.org.uk
Fri Jan 14 12:34:00 EST 2011


On Fri, Jan 14, 2011 at 05:13:01PM +0100, Jean Pihet wrote:
> Is the name 'omap_sram_push' wrong then?
> What about the following?
> @@ -251,9 +251,8 @@ void * omap_sram_push(void * start, unsigned long size)
> 
>        omap_sram_ceil -= size;
>        omap_sram_ceil = ROUND_DOWN(omap_sram_ceil, sizeof(void *));
>  -     memcpy((void *)omap_sram_ceil, start, size);
>  -     flush_icache_range((unsigned long)omap_sram_ceil,
>  -             (unsigned long)(omap_sram_ceil + size));
> 
>  -     return (void *)omap_sram_ceil;
>  +    return fncpy((void *)omap_sram_ceil, start, size);

It's more correct, but still missing out on the type safety which we've
tried to provide with fncpy.  Note also the other issue with Dave Martin
has raised though - this isn't ready for merging yet.



More information about the linux-arm-kernel mailing list