* [PATCH][v2] powerpc/lib: remove memcpy_flushcache redundant return
@ 2019-04-12 2:51 Li RongQing
2019-04-23 16:13 ` Christophe Leroy
0 siblings, 1 reply; 2+ messages in thread
From: Li RongQing @ 2019-04-12 2:51 UTC (permalink / raw)
To: linuxppc-dev
Align it with other architectures and none of the callers has
been interested its return
Signed-off-by: Li RongQing <lirongqing@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);
#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);
--
2.16.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH][v2] powerpc/lib: remove memcpy_flushcache redundant return
2019-04-12 2:51 [PATCH][v2] powerpc/lib: remove memcpy_flushcache redundant return Li RongQing
@ 2019-04-23 16:13 ` Christophe Leroy
0 siblings, 0 replies; 2+ messages in thread
From: Christophe Leroy @ 2019-04-23 16:13 UTC (permalink / raw)
To: Li RongQing, linuxppc-dev
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@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);
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-04-23 16:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-12 2:51 [PATCH][v2] powerpc/lib: remove memcpy_flushcache redundant return Li RongQing
2019-04-23 16:13 ` Christophe Leroy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).