]> git.droids-corp.org - dpdk.git/commitdiff
power: fix build with clang 13
authorJim Harris <james.r.harris@intel.com>
Fri, 5 Nov 2021 15:53:51 +0000 (15:53 +0000)
committerDavid Marchand <david.marchand@redhat.com>
Fri, 12 Nov 2021 14:33:35 +0000 (15:33 +0100)
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.

Fixes: 450f0791312c ("power: add traffic pattern aware power control")
Cc: stable@dpdk.org
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
lib/power/rte_power_empty_poll.c

index 975aa9299799f9c48df42945fb9f922d042ffef4..8a2d60c5767085a4dd2b847cc6e954a504030eb9 100644 (file)
@@ -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;