DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jim Harris <james.r.harris@intel.com>
To: dev@dpdk.org, david.hunt@intel.com
Cc: Jim Harris <james.r.harris@intel.com>
Subject: [dpdk-dev] [PATCH] power: fix unused-but-set variable error
Date: Fri, 29 Oct 2021 17:15:50 +0000	[thread overview]
Message-ID: <20211029171550.330229-1-james.r.harris@intel.com> (raw)

clang-13 rightfully complains that the tot_ppi
variable in update_stats is set but not used, since
the final accumulated tot_ppi results isn't used
anywhere. So just remove the tot_ppi variable.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
---
 lib/power/rte_power_empty_poll.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/power/rte_power_empty_poll.c b/lib/power/rte_power_empty_poll.c
index 975aa92997..8a2d60c576 100644
--- a/lib/power/rte_power_empty_poll.c
+++ b/lib/power/rte_power_empty_poll.c
@@ -207,7 +207,7 @@ update_training_stats(struct priority_worker *poll_stats,
 static __rte_always_inline uint32_t
 update_stats(struct priority_worker *poll_stats)
 {
-	uint64_t tot_edpi = 0, tot_ppi = 0;
+	uint64_t tot_edpi = 0;
 	uint32_t j, percent;
 
 	struct priority_worker *s = poll_stats;
@@ -237,7 +237,6 @@ update_stats(struct priority_worker *poll_stats)
 
 	for (j = 0; j < BINS_AV; j++) {
 		tot_edpi += s->edpi_av[j];
-		tot_ppi += s->ppi_av[j];
 	}
 
 	tot_edpi = tot_edpi / BINS_AV;
-- 
2.32.0


             reply	other threads:[~2021-10-29 17:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-29 17:15 Jim Harris [this message]
2021-10-29 18:53 ` David Marchand
2021-11-04 17:32   ` Thomas Monjalon

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=20211029171550.330229-1-james.r.harris@intel.com \
    --to=james.r.harris@intel.com \
    --cc=david.hunt@intel.com \
    --cc=dev@dpdk.org \
    /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).