[PATCH][v2] powerpc/lib: remove memcpy_flushcache redundant return
Christophe Leroy
christophe.leroy at c-s.fr
Wed Apr 24 02:13:18 AEST 2019
Le 12/04/2019 à 04:51, Li RongQing a écrit :
> Align it with other architectures and none of the callers has
> been interested its return
>
> Signed-off-by: Li RongQing <lirongqing at baidu.com>
> ---
> v1->v2: change memcpy_flushcache declaration in arch/powerpc/include/asm/string.h
>
> arch/powerpc/include/asm/string.h | 2 +-
> arch/powerpc/lib/pmem.c | 4 +---
> 2 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/string.h b/arch/powerpc/include/asm/string.h
> index 1647de15a31e..15e2e16272ea 100644
> --- a/arch/powerpc/include/asm/string.h
> +++ b/arch/powerpc/include/asm/string.h
> @@ -25,7 +25,7 @@ extern void * memcpy(void *,const void *,__kernel_size_t);
> extern void * memmove(void *,const void *,__kernel_size_t);
> extern int memcmp(const void *,const void *,__kernel_size_t);
> extern void * memchr(const void *,int,__kernel_size_t);
> -extern void * memcpy_flushcache(void *,const void *,__kernel_size_t);
> +extern void memcpy_flushcache(void *, const void *, __kernel_size_t);
As you are modifying this line, you should make it fully iaw lastest
rules, ie no 'extern' keyword and args should have names.
I guess, just copy it from pmem.c:
void memcpy_flushcache(void *dest, const void *src, size_t size);
Christophe
>
> #ifdef CONFIG_PPC64
> #define __HAVE_ARCH_MEMSET32
> diff --git a/arch/powerpc/lib/pmem.c b/arch/powerpc/lib/pmem.c
> index 53c018762e1c..a7a1b3fc6720 100644
> --- a/arch/powerpc/lib/pmem.c
> +++ b/arch/powerpc/lib/pmem.c
> @@ -48,14 +48,12 @@ long __copy_from_user_flushcache(void *dest, const void __user *src,
> return copied;
> }
>
> -void *memcpy_flushcache(void *dest, const void *src, size_t size)
> +void memcpy_flushcache(void *dest, const void *src, size_t size)
> {
> unsigned long start = (unsigned long) dest;
>
> memcpy(dest, src, size);
> flush_inval_dcache_range(start, start + size);
> -
> - return dest;
> }
> EXPORT_SYMBOL(memcpy_flushcache);
>
>
More information about the Linuxppc-dev
mailing list