DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	Olivier Matz <olivier.matz@6wind.com>,
	Yipeng Wang <yipeng1.wang@intel.com>,
	Sameh Gobriel <sameh.gobriel@intel.com>,
	Bruce Richardson <bruce.richardson@intel.com>,
	Vladimir Medvedkin <vladimir.medvedkin@intel.com>,
	Anatoly Burakov <anatoly.burakov@intel.com>,
	Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>,
	Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
Subject: [PATCH v3 06/14] test: fix whitespace
Date: Wed,  9 Nov 2022 15:24:43 -0800	[thread overview]
Message-ID: <20221109232451.265059-7-stephen@networkplumber.org> (raw)
In-Reply-To: <20221109232451.265059-1-stephen@networkplumber.org>

Add space after keywords.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 app/test/test_cmdline_cirbuf.c |  4 ++--
 app/test/test_debug.c          |  4 ++--
 app/test/test_hash.c           |  6 +++---
 app/test/test_lpm6_perf.c      |  2 +-
 app/test/test_malloc.c         | 14 +++++++-------
 app/test/test_mbuf.c           | 14 ++++++--------
 app/test/test_ring_perf.c      |  2 +-
 app/test/test_spinlock.c       |  2 +-
 8 files changed, 23 insertions(+), 25 deletions(-)

diff --git a/app/test/test_cmdline_cirbuf.c b/app/test/test_cmdline_cirbuf.c
index 8ac326cb02e0..6f7aae6df59a 100644
--- a/app/test/test_cmdline_cirbuf.c
+++ b/app/test/test_cmdline_cirbuf.c
@@ -708,7 +708,7 @@ test_cirbuf_char_fill(void)
 		return -1;
 	}
 	/* delete buffer from tail */
-	for(i = 0; i < CMDLINE_TEST_BUFSIZE; i++)
+	for (i = 0; i < CMDLINE_TEST_BUFSIZE; i++)
 		cirbuf_del_tail_safe(&cb);
 	/* try to delete from an empty buffer */
 	if (cirbuf_del_tail_safe(&cb) >= 0) {
@@ -737,7 +737,7 @@ test_cirbuf_char_fill(void)
 		return -1;
 	}
 	/* delete buffer from head */
-	for(i = 0; i < CMDLINE_TEST_BUFSIZE; i++)
+	for (i = 0; i < CMDLINE_TEST_BUFSIZE; i++)
 		cirbuf_del_head_safe(&cb);
 	/* try to delete from an empty buffer */
 	if (cirbuf_del_head_safe(&cb) >= 0) {
diff --git a/app/test/test_debug.c b/app/test/test_debug.c
index 2704f5b92726..28fc2180e2b0 100644
--- a/app/test/test_debug.c
+++ b/app/test/test_debug.c
@@ -53,7 +53,7 @@ test_panic(void)
 		return -1;
 	}
 	wait(&status);
-	if(status == 0){
+	if (status == 0) {
 		printf("Child process terminated normally!\n");
 		return -1;
 	} else
@@ -84,7 +84,7 @@ test_exit_val(int exit_val)
 	}
 	wait(&status);
 	printf("Child process status: %d\n", status);
-	if(!WIFEXITED(status) || WEXITSTATUS(status) != (uint8_t)exit_val){
+	if (!WIFEXITED(status) || WEXITSTATUS(status) != (uint8_t)exit_val) {
 		printf("Child process terminated with incorrect status (expected = %d)!\n",
 				exit_val);
 		return -1;
diff --git a/app/test/test_hash.c b/app/test/test_hash.c
index 3e45afaa67fc..35d9d8a62ef8 100644
--- a/app/test/test_hash.c
+++ b/app/test/test_hash.c
@@ -724,12 +724,12 @@ static int test_five_keys(void)
 	}
 
 	/* Lookup */
-	for(i = 0; i < 5; i++)
+	for (i = 0; i < 5; i++)
 		key_array[i] = &keys[i];
 
 	ret = rte_hash_lookup_bulk(handle, &key_array[0], 5, (int32_t *)pos);
-	if(ret == 0)
-		for(i = 0; i < 5; i++) {
+	if (ret == 0)
+		for (i = 0; i < 5; i++) {
 			print_key_info("Lkp", key_array[i], pos[i]);
 			RETURN_IF_ERROR(pos[i] != expected_pos[i],
 					"failed to find key (pos[%u]=%d)", i, pos[i]);
diff --git a/app/test/test_lpm6_perf.c b/app/test/test_lpm6_perf.c
index aaf2773b6fac..2f9321345e4b 100644
--- a/app/test/test_lpm6_perf.c
+++ b/app/test/test_lpm6_perf.c
@@ -47,7 +47,7 @@ print_route_distribution(const struct rules_tbl_entry *table, uint32_t n)
 	printf("--------------------------- \n");
 
 	/* Count depths. */
-	for(i = 1; i <= 128; i++) {
+	for (i = 1; i <= 128; i++) {
 		unsigned depth_counter = 0;
 		double percent_hits;
 
diff --git a/app/test/test_malloc.c b/app/test/test_malloc.c
index de40e506113a..8d3750a3f1f0 100644
--- a/app/test/test_malloc.c
+++ b/app/test/test_malloc.c
@@ -86,8 +86,8 @@ test_align_overlap_per_lcore(__rte_unused void *arg)
 			ret = -1;
 			break;
 		}
-		for(j = 0; j < 1000 ; j++) {
-			if( *(char *)p1 != 0) {
+		for (j = 0; j < 1000 ; j++) {
+			if (*(char *)p1 != 0) {
 				printf("rte_zmalloc didn't zero the allocated memory\n");
 				ret = -1;
 			}
@@ -157,8 +157,8 @@ test_reordered_free_per_lcore(__rte_unused void *arg)
 			ret = -1;
 			break;
 		}
-		for(j = 0; j < 1000 ; j++) {
-			if( *(char *)p1 != 0) {
+		for (j = 0; j < 1000 ; j++) {
+			if (*(char *)p1 != 0) {
 				printf("rte_zmalloc didn't zero the allocated memory\n");
 				ret = -1;
 			}
@@ -331,12 +331,12 @@ test_multi_alloc_statistics(void)
 	/* After freeing both allocations check stats return to original */
 	rte_malloc_get_socket_stats(socket, &post_stats);
 
-	if(second_stats.heap_totalsz_bytes != first_stats.heap_totalsz_bytes) {
+	if (second_stats.heap_totalsz_bytes != first_stats.heap_totalsz_bytes) {
 		printf("Incorrect heap statistics: Total size \n");
 		return -1;
 	}
 	/* Check allocated size is equal to two additions plus overhead */
-	if(second_stats.heap_allocsz_bytes !=
+	if (second_stats.heap_allocsz_bytes !=
 			size + overhead + first_stats.heap_allocsz_bytes) {
 		printf("Incorrect heap statistics: Allocated size \n");
 		return -1;
@@ -495,7 +495,7 @@ test_realloc_socket(int socket)
 		return -1;
 	}
 	/* calc an alignment we don't already have */
-	while(RTE_PTR_ALIGN(ptr7, new_align) == ptr7)
+	while (RTE_PTR_ALIGN(ptr7, new_align) == ptr7)
 		new_align *= 2;
 	char *ptr8 = rte_realloc_socket(ptr7, size7, new_align, socket);
 	if (!ptr8){
diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
index 53fe898a384c..fceacb8fead8 100644
--- a/app/test/test_mbuf.c
+++ b/app/test/test_mbuf.c
@@ -120,7 +120,7 @@ static unsigned refcnt_lcore[RTE_MAX_LCORE];
 		printf("mbuf test FAILED (l.%d): <" str ">\n",		\
 		       __LINE__,  ##__VA_ARGS__);			\
 		goto fail;						\
-} while(0)
+} while (0)
 
 /*
  * test data manipulation in mbuf with non-ascii data
@@ -154,9 +154,7 @@ test_pktmbuf_with_non_ascii_data(struct rte_mempool *pktmbuf_pool)
 	return 0;
 
 fail:
-	if(m) {
-		rte_pktmbuf_free(m);
-	}
+	rte_pktmbuf_free(m);
 	return -1;
 }
 
@@ -701,12 +699,12 @@ test_pktmbuf_pool(struct rte_mempool *pktmbuf_pool)
 	}
 	struct rte_mbuf *extra = NULL;
 	extra = rte_pktmbuf_alloc(pktmbuf_pool);
-	if(extra != NULL) {
+	if (extra != NULL) {
 		printf("Error pool not empty");
 		ret = -1;
 	}
 	extra = rte_pktmbuf_clone(m[0], pktmbuf_pool);
-	if(extra != NULL) {
+	if (extra != NULL) {
 		printf("Error pool not empty");
 		ret = -1;
 	}
@@ -966,7 +964,7 @@ test_pktmbuf_free_segment(struct rte_mempool *pktmbuf_pool)
 			struct rte_mbuf *mb, *mt;
 
 			mb = m[i];
-			while(mb != NULL) {
+			while (mb != NULL) {
 				mt = mb;
 				mb = mb->next;
 				rte_pktmbuf_free_seg(mt);
@@ -1195,7 +1193,7 @@ verify_mbuf_check_panics(struct rte_mbuf *buf)
 		return -1;
 	}
 	wait(&status);
-	if(status == 0)
+	if (status == 0)
 		return -1;
 
 	return 0;
diff --git a/app/test/test_ring_perf.c b/app/test/test_ring_perf.c
index 2d8bb675a331..4cac9a94a73c 100644
--- a/app/test/test_ring_perf.c
+++ b/app/test/test_ring_perf.c
@@ -190,7 +190,7 @@ enqueue_dequeue_bulk_helper(const unsigned int flag, const int esize,
 #else
 	if (__sync_add_and_fetch(&lcore_count, 1) != 2)
 #endif
-		while(lcore_count != 2)
+		while (lcore_count != 2)
 			rte_pause();
 
 	burst = test_ring_calloc(MAX_BURST, esize);
diff --git a/app/test/test_spinlock.c b/app/test/test_spinlock.c
index 3f59372300c3..3ee82fa963a5 100644
--- a/app/test/test_spinlock.c
+++ b/app/test/test_spinlock.c
@@ -237,7 +237,7 @@ test_spinlock(void)
 	/*
 	 * Try to acquire a lock that we already own
 	 */
-	if(!rte_spinlock_recursive_trylock(&slr)) {
+	if (!rte_spinlock_recursive_trylock(&slr)) {
 		printf("rte_spinlock_recursive_trylock failed on a lock that "
 		       "we already own\n");
 		ret = -1;
-- 
2.35.1


  parent reply	other threads:[~2022-11-09 23:25 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-09 19:14 [PATCH 00/14] whitespace around keywords Stephen Hemminger
2022-11-09 19:14 ` [PATCH 01/14] eal: fix whitespace Stephen Hemminger
2022-11-09 19:14 ` [PATCH 02/14] cmdline: " Stephen Hemminger
2022-11-09 19:14 ` [PATCH 03/14] timer: " Stephen Hemminger
2022-11-09 19:14 ` [PATCH 04/14] ip_frag: " Stephen Hemminger
2022-11-09 19:14 ` [PATCH 05/14] testpmd: fix whitspace Stephen Hemminger
2022-11-09 19:14 ` [PATCH 06/14] test: fix whitespace Stephen Hemminger
2022-11-09 19:14 ` [PATCH 07/14] examples/qos_sched: " Stephen Hemminger
2022-11-09 19:28   ` Dumitrescu, Cristian
2022-11-09 19:14 ` [PATCH 08/14] examples/vhost: " Stephen Hemminger
2022-11-09 19:14 ` [PATCH 09/14] l3fwd: " Stephen Hemminger
2022-11-09 19:14 ` [PATCH 10/14] examples: " Stephen Hemminger
2022-11-09 19:14 ` [PATCH 11/14] bus/pci: " Stephen Hemminger
2022-11-09 19:14 ` [PATCH 12/14] net/e1000: " Stephen Hemminger
2022-11-09 19:14 ` [PATCH 13/14] net/i40e: " Stephen Hemminger
2022-11-09 19:14 ` [PATCH 14/14] net/bnx2x: " Stephen Hemminger
2022-11-09 19:53 ` [PATCH v2 00/14] whitespace after keywords Stephen Hemminger
2022-11-09 19:53   ` [PATCH v2 01/14] eal: fix whitespace Stephen Hemminger
2022-11-09 19:53   ` [PATCH v2 02/14] cmdline: " Stephen Hemminger
2022-11-09 19:53   ` [PATCH v2 03/14] timer: " Stephen Hemminger
2022-11-09 19:53   ` [PATCH v2 04/14] ip_frag: " Stephen Hemminger
2022-11-09 19:53   ` [PATCH v2 05/14] testpmd: " Stephen Hemminger
2022-11-09 19:53   ` [PATCH v2 06/14] test: " Stephen Hemminger
2022-11-09 19:53   ` [PATCH v2 07/14] examples/qos_sched: " Stephen Hemminger
2022-11-09 19:53   ` [PATCH v2 08/14] examples/vhost: " Stephen Hemminger
2022-11-09 19:53   ` [PATCH v2 09/14] l3fwd: " Stephen Hemminger
2022-11-09 19:53   ` [PATCH v2 10/14] examples: " Stephen Hemminger
2022-11-09 19:53   ` [PATCH v2 11/14] bus/pci: " Stephen Hemminger
2022-11-09 19:53   ` [PATCH v2 12/14] net/e1000: " Stephen Hemminger
2022-11-09 19:53   ` [PATCH v2 13/14] net/i40e: " Stephen Hemminger
2022-11-09 19:53   ` [PATCH v2 14/14] net/bnx2x: " Stephen Hemminger
2022-11-09 23:24 ` [PATCH v3 00/14] whitespace after keywords Stephen Hemminger
2022-11-09 23:24   ` [PATCH v3 01/14] eal: fix whitespace Stephen Hemminger
2022-11-09 23:24   ` [PATCH v3 02/14] cmdline: " Stephen Hemminger
2022-11-09 23:24   ` [PATCH v3 03/14] timer: " Stephen Hemminger
2022-11-09 23:24   ` [PATCH v3 04/14] ip_frag: " Stephen Hemminger
2022-11-09 23:24   ` [PATCH v3 05/14] testpmd: " Stephen Hemminger
2022-11-11  6:30     ` Zhang, Yuying
2022-11-11  7:12       ` Zhang, Yuying
2022-11-09 23:24   ` Stephen Hemminger [this message]
2022-11-09 23:24   ` [PATCH v3 07/14] examples/qos_sched: " Stephen Hemminger
2022-11-09 23:24   ` [PATCH v3 08/14] examples/vhost: " Stephen Hemminger
2022-11-10  1:48     ` Xia, Chenbo
2022-11-09 23:24   ` [PATCH v3 09/14] l3fwd: " Stephen Hemminger
2022-11-09 23:24   ` [PATCH v3 10/14] examples: " Stephen Hemminger
2022-11-09 23:24   ` [PATCH v3 11/14] bus/pci: " Stephen Hemminger
2022-11-09 23:24   ` [PATCH v3 12/14] net/e1000: " Stephen Hemminger
2022-11-09 23:24   ` [PATCH v3 13/14] net/i40e: " Stephen Hemminger
2022-11-11  6:23     ` Zhang, Yuying
2022-11-11  7:12       ` Zhang, Yuying
2022-11-11 16:48       ` Stephen Hemminger
2022-11-09 23:24   ` [PATCH v3 14/14] net/bnx2x: " Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221109232451.265059-7-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=anatoly.burakov@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=honnappa.nagarahalli@arm.com \
    --cc=konstantin.v.ananyev@yandex.ru \
    --cc=olivier.matz@6wind.com \
    --cc=sameh.gobriel@intel.com \
    --cc=vladimir.medvedkin@intel.com \
    --cc=yipeng1.wang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).