[6/6] examples/performance-thread: fix unused but set variables

Message ID 20211115175855.1091621-7-conor.walsh@intel.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series fix unused but set variables |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS

Commit Message

Conor Walsh Nov. 15, 2021, 5:58 p.m. UTC
  This patch removes the hits variable from the cpu_load_collector function
within the performance thread example app as it is an unused but set
variable.

Bugzilla ID: 881
Fixes: d48415e1fee3 ("examples/performance-thread: add l3fwd-thread app")
Cc: stable@dpdk.org

Reported-by: Liang Longfeng <longfengx.liang@intel.com>
Signed-off-by: Conor Walsh <conor.walsh@intel.com>
---
 examples/performance-thread/l3fwd-thread/main.c | 3 ---
 1 file changed, 3 deletions(-)
  

Patch

diff --git a/examples/performance-thread/l3fwd-thread/main.c b/examples/performance-thread/l3fwd-thread/main.c
index 3a6a33bda3..8a35040597 100644
--- a/examples/performance-thread/l3fwd-thread/main.c
+++ b/examples/performance-thread/l3fwd-thread/main.c
@@ -1885,7 +1885,6 @@  process_burst(struct rte_mbuf *pkts_burst[MAX_PKT_BURST], int nb_rx,
 static int __rte_noreturn
 cpu_load_collector(__rte_unused void *arg) {
 	unsigned i, j, k;
-	uint64_t hits;
 	uint64_t prev_tsc, diff_tsc, cur_tsc;
 	uint64_t total[MAX_CPU] = { 0 };
 	unsigned min_cpu = MAX_CPU;
@@ -1972,12 +1971,10 @@  cpu_load_collector(__rte_unused void *arg) {
 			printf("cpu#     proc%%  poll%%  overhead%%\n\n");
 
 			for (i = min_cpu; i <= max_cpu; i++) {
-				hits = 0;
 				printf("CPU %d:", i);
 				for (j = 0; j < MAX_CPU_COUNTER; j++) {
 					printf("%7" PRIu64 "",
 							cpu_load.hits[j][i] * 100 / cpu_load.counter);
-					hits += cpu_load.hits[j][i];
 					cpu_load.hits[j][i] = 0;
 				}
 				printf("%7" PRIu64 "\n",