[dpdk-dev,PATCHv2,1/2] rte_compat.h : Clean up some typos

Message ID 1435170885-17643-1-git-send-email-nhorman@tuxdriver.com (mailing list archive)
State Superseded, archived
Headers

Commit Message

Neil Horman June 24, 2015, 6:34 p.m. UTC
Clean up some macro definition typos and comments

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: thomas.monjalon@6wind.com
---
 lib/librte_compat/rte_compat.h | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
  

Comments

Thomas Monjalon June 24, 2015, 7:41 p.m. UTC | #1
2015-06-24 14:34, Neil Horman:
> @@ -103,7 +103,7 @@
>  #define VERSION_SYMBOL(b, e, v)

Should be (b, e, n)

>  #define __vsym
>  #define BASE_SYMBOL(b, n)

Should be (b, e)

> -#define BIND_DEFAULT_SYMBOL(b, v)
> +#define BIND_DEFAULT_SYMBOL(b, e, n)
  
Neil Horman June 24, 2015, 8:15 p.m. UTC | #2
On Wed, Jun 24, 2015 at 09:41:08PM +0200, Thomas Monjalon wrote:
> 2015-06-24 14:34, Neil Horman:
> > @@ -103,7 +103,7 @@
> >  #define VERSION_SYMBOL(b, e, v)
> 
> Should be (b, e, n)
> 
> >  #define __vsym
> >  #define BASE_SYMBOL(b, n)
> 
> Should be (b, e)
> 
> > -#define BIND_DEFAULT_SYMBOL(b, v)
> > +#define BIND_DEFAULT_SYMBOL(b, e, n)
> 
> 
> 
Agreed, though thats really just cosmetic, given that the error is in the empty
defines.  Can you fix it in patchwork by hand, or would you prefer a repost?

Neil
  
Thomas Monjalon June 24, 2015, 8:49 p.m. UTC | #3
2015-06-24 16:15, Neil Horman:
> On Wed, Jun 24, 2015 at 09:41:08PM +0200, Thomas Monjalon wrote:
> > 2015-06-24 14:34, Neil Horman:
> > > @@ -103,7 +103,7 @@
> > >  #define VERSION_SYMBOL(b, e, v)
> > 
> > Should be (b, e, n)
> > 
> > >  #define __vsym
> > >  #define BASE_SYMBOL(b, n)
> > 
> > Should be (b, e)
> > 
> > > -#define BIND_DEFAULT_SYMBOL(b, v)
> > > +#define BIND_DEFAULT_SYMBOL(b, e, n)
> > 
> > 
> > 
> Agreed, though thats really just cosmetic, given that the error is in the empty
> defines.  Can you fix it in patchwork by hand, or would you prefer a repost?

I can manage it but I think you'll need a repost for the patch 2/2 anyway.
  

Patch

diff --git a/lib/librte_compat/rte_compat.h b/lib/librte_compat/rte_compat.h
index fb0dc19..75920a1 100644
--- a/lib/librte_compat/rte_compat.h
+++ b/lib/librte_compat/rte_compat.h
@@ -54,7 +54,7 @@ 
  * foo is exported as a global symbol.
  *
  * 2) rename the existing function int foo(char *string) to
- *	int __vsym foo_v20(char *string)
+ *	int foo_v20(char *string)
  *
  * 3) Add this macro immediately below the function
  *	VERSION_SYMBOL(foo, _v20, 2.0);
@@ -63,7 +63,7 @@ 
  *	char foo(int value, int otherval) { ...}
  *
  * 5) Mark the newest version as the default version
- *	BIND_DEFAULT_SYMBOL(foo, 2.1);
+ *	BIND_DEFAULT_SYMBOL(foo, _v21, 2.1);
  *
  */
 
@@ -79,21 +79,21 @@ 
  * Creates a symbol version table entry binding symbol <b>@DPDK_<n> to the internal
  * function name <b>_<e>
  */
-#define VERSION_SYMBOL(b, e, n) __asm__(".symver " RTE_STR(b) RTE_STR(e) ", "RTE_STR(b)"@DPDK_"RTE_STR(n))
+#define VERSION_SYMBOL(b, e, n) __asm__(".symver " RTE_STR(b) RTE_STR(e) ", " RTE_STR(b) "@DPDK_" RTE_STR(n))
 
 /*
  * BASE_SYMBOL
  * Creates a symbol version table entry binding unversioned symbol <b>
  * to the internal function <b>_<e>
  */
-#define BASE_SYMBOL(b, e) __asm__(".symver " RTE_STR(b) RTE_STR(e) ", "RTE_STR(b)"@")
+#define BASE_SYMBOL(b, e) __asm__(".symver " RTE_STR(b) RTE_STR(e) ", " RTE_STR(b)"@")
 
 /*
- * BNID_DEFAULT_SYMBOL
+ * BIND_DEFAULT_SYMBOL
  * Creates a symbol version entry instructing the linker to bind references to
  * symbol <b> to the internal symbol <b>_<e>
  */
-#define BIND_DEFAULT_SYMBOL(b, e, n) __asm__(".symver " RTE_STR(b) RTE_STR(e) ", "RTE_STR(b)"@@DPDK_"RTE_STR(n))
+#define BIND_DEFAULT_SYMBOL(b, e, n) __asm__(".symver " RTE_STR(b) RTE_STR(e) ", " RTE_STR(b) "@@DPDK_" RTE_STR(n))
 #define __vsym __attribute__((used))
 
 #else
@@ -103,7 +103,7 @@ 
 #define VERSION_SYMBOL(b, e, v)
 #define __vsym
 #define BASE_SYMBOL(b, n)
-#define BIND_DEFAULT_SYMBOL(b, v)
+#define BIND_DEFAULT_SYMBOL(b, e, n)
 
 /*
  * RTE_BUILD_SHARED_LIB=n