[v5,7/8] test/ring: remove unnecessary braces
diff mbox series

Message ID 20201025054556.14277-8-honnappa.nagarahalli@arm.com
State Accepted
Delegated to: David Marchand
Headers show
Series
  • lib/ring: add zero copy APIs
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Honnappa Nagarahalli Oct. 25, 2020, 5:45 a.m. UTC
Remove unnecessary braces to improve readability.

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
---
 app/test/test_ring.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

Ananyev, Konstantin Oct. 27, 2020, 2:13 p.m. UTC | #1
> Remove unnecessary braces to improve readability.
> 
> Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
> ---
>  app/test/test_ring.h | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/app/test/test_ring.h b/app/test/test_ring.h
> index b525abb79..c8bfec839 100644
> --- a/app/test/test_ring.h
> +++ b/app/test/test_ring.h
> @@ -35,11 +35,11 @@ test_ring_create(const char *name, int esize, unsigned int count,
>  		int socket_id, unsigned int flags)
>  {
>  	/* Legacy queue APIs? */
> -	if ((esize) == -1)
> -		return rte_ring_create((name), (count), (socket_id), (flags));
> +	if (esize == -1)
> +		return rte_ring_create(name, count, socket_id, flags);
>  	else
> -		return rte_ring_create_elem((name), (esize), (count),
> -						(socket_id), (flags));
> +		return rte_ring_create_elem(name, esize, count,
> +						socket_id, flags);
>  }
> 
>  static inline void*
> @@ -102,7 +102,7 @@ test_ring_enqueue(struct rte_ring *r, void **obj, int esize, unsigned int n,
>  			unsigned int api_type)
>  {
>  	/* Legacy queue APIs? */
> -	if ((esize) == -1)
> +	if (esize == -1)
>  		switch (api_type) {
>  		case (TEST_RING_THREAD_DEF | TEST_RING_ELEM_SINGLE):
>  			return rte_ring_enqueue(r, *obj);
> @@ -163,7 +163,7 @@ test_ring_dequeue(struct rte_ring *r, void **obj, int esize, unsigned int n,
>  			unsigned int api_type)
>  {
>  	/* Legacy queue APIs? */
> -	if ((esize) == -1)
> +	if (esize == -1)
>  		switch (api_type) {
>  		case (TEST_RING_THREAD_DEF | TEST_RING_ELEM_SINGLE):
>  			return rte_ring_dequeue(r, obj);
> --

Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

> 2.17.1

Patch
diff mbox series

diff --git a/app/test/test_ring.h b/app/test/test_ring.h
index b525abb79..c8bfec839 100644
--- a/app/test/test_ring.h
+++ b/app/test/test_ring.h
@@ -35,11 +35,11 @@  test_ring_create(const char *name, int esize, unsigned int count,
 		int socket_id, unsigned int flags)
 {
 	/* Legacy queue APIs? */
-	if ((esize) == -1)
-		return rte_ring_create((name), (count), (socket_id), (flags));
+	if (esize == -1)
+		return rte_ring_create(name, count, socket_id, flags);
 	else
-		return rte_ring_create_elem((name), (esize), (count),
-						(socket_id), (flags));
+		return rte_ring_create_elem(name, esize, count,
+						socket_id, flags);
 }
 
 static inline void*
@@ -102,7 +102,7 @@  test_ring_enqueue(struct rte_ring *r, void **obj, int esize, unsigned int n,
 			unsigned int api_type)
 {
 	/* Legacy queue APIs? */
-	if ((esize) == -1)
+	if (esize == -1)
 		switch (api_type) {
 		case (TEST_RING_THREAD_DEF | TEST_RING_ELEM_SINGLE):
 			return rte_ring_enqueue(r, *obj);
@@ -163,7 +163,7 @@  test_ring_dequeue(struct rte_ring *r, void **obj, int esize, unsigned int n,
 			unsigned int api_type)
 {
 	/* Legacy queue APIs? */
-	if ((esize) == -1)
+	if (esize == -1)
 		switch (api_type) {
 		case (TEST_RING_THREAD_DEF | TEST_RING_ELEM_SINGLE):
 			return rte_ring_dequeue(r, obj);