[dpdk-dev] eal: remove useless internal function from memcpy headers

Message ID 1461098825-21640-1-git-send-email-thomas.monjalon@6wind.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers

Commit Message

Thomas Monjalon April 19, 2016, 8:47 p.m. UTC
  The function rte_memcpy_func() is used in ARM and PPC implementations
of rte_memcpy().
There are some useless copies in Tile and some ARM branches.
It was also declared without doxygen comment in the generic header.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 lib/librte_eal/common/include/arch/arm/rte_memcpy_32.h | 6 ------
 lib/librte_eal/common/include/arch/arm/rte_memcpy_64.h | 6 ------
 lib/librte_eal/common/include/arch/tile/rte_memcpy.h   | 6 ------
 lib/librte_eal/common/include/generic/rte_memcpy.h     | 7 -------
 4 files changed, 25 deletions(-)
  

Comments

David Marchand April 20, 2016, 9:07 a.m. UTC | #1
On Tue, Apr 19, 2016 at 10:47 PM, Thomas Monjalon
<thomas.monjalon@6wind.com> wrote:
> The function rte_memcpy_func() is used in ARM and PPC implementations
> of rte_memcpy().
> There are some useless copies in Tile and some ARM branches.
> It was also declared without doxygen comment in the generic header.
>
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>

Looks good to me.
Acked-by: David Marchand <david.marchand@6wind.com>
  
Thomas Monjalon April 27, 2016, 3:41 p.m. UTC | #2
2016-04-20 11:07, David Marchand:
> On Tue, Apr 19, 2016 at 10:47 PM, Thomas Monjalon
> <thomas.monjalon@6wind.com> wrote:
> > The function rte_memcpy_func() is used in ARM and PPC implementations
> > of rte_memcpy().
> > There are some useless copies in Tile and some ARM branches.
> > It was also declared without doxygen comment in the generic header.
> >
> > Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> 
> Looks good to me.
> Acked-by: David Marchand <david.marchand@6wind.com>

Applied
  

Patch

diff --git a/lib/librte_eal/common/include/arch/arm/rte_memcpy_32.h b/lib/librte_eal/common/include/arch/arm/rte_memcpy_32.h
index 988125b..da6c233 100644
--- a/lib/librte_eal/common/include/arch/arm/rte_memcpy_32.h
+++ b/lib/librte_eal/common/include/arch/arm/rte_memcpy_32.h
@@ -323,12 +323,6 @@  rte_memcpy(void *dst, const void *src, size_t n)
 	return memcpy(dst, src, n);
 }
 
-static inline void *
-rte_memcpy_func(void *dst, const void *src, size_t n)
-{
-	return memcpy(dst, src, n);
-}
-
 #endif /* RTE_ARCH_ARM_NEON_MEMCPY */
 
 #ifdef __cplusplus
diff --git a/lib/librte_eal/common/include/arch/arm/rte_memcpy_64.h b/lib/librte_eal/common/include/arch/arm/rte_memcpy_64.h
index 917cdc1..5db66b6 100644
--- a/lib/librte_eal/common/include/arch/arm/rte_memcpy_64.h
+++ b/lib/librte_eal/common/include/arch/arm/rte_memcpy_64.h
@@ -80,12 +80,6 @@  rte_mov256(uint8_t *dst, const uint8_t *src)
 
 #define rte_memcpy(d, s, n)	memcpy((d), (s), (n))
 
-static inline void *
-rte_memcpy_func(void *dst, const void *src, size_t n)
-{
-	return memcpy(dst, src, n);
-}
-
 #ifdef __cplusplus
 }
 #endif
diff --git a/lib/librte_eal/common/include/arch/tile/rte_memcpy.h b/lib/librte_eal/common/include/arch/tile/rte_memcpy.h
index 9b5b37e..e606957 100644
--- a/lib/librte_eal/common/include/arch/tile/rte_memcpy.h
+++ b/lib/librte_eal/common/include/arch/tile/rte_memcpy.h
@@ -80,12 +80,6 @@  rte_mov256(uint8_t *dst, const uint8_t *src)
 
 #define rte_memcpy(d, s, n)	memcpy((d), (s), (n))
 
-static inline void *
-rte_memcpy_func(void *dst, const void *src, size_t n)
-{
-	return memcpy(dst, src, n);
-}
-
 #ifdef __cplusplus
 }
 #endif
diff --git a/lib/librte_eal/common/include/generic/rte_memcpy.h b/lib/librte_eal/common/include/generic/rte_memcpy.h
index 03e8477..afb0afe 100644
--- a/lib/librte_eal/common/include/generic/rte_memcpy.h
+++ b/lib/librte_eal/common/include/generic/rte_memcpy.h
@@ -134,11 +134,4 @@  rte_memcpy(void *dst, const void *src, size_t n);
 
 #endif /* __DOXYGEN__ */
 
-/*
- * memcpy() function used by rte_memcpy macro
- */
-static inline void *
-rte_memcpy_func(void *dst, const void *src, size_t n) __attribute__((always_inline));
-
-
 #endif /* _RTE_MEMCPY_H_ */