[7/7] lib/power: fix unused but set variables

Message ID 20211112140111.922171-8-conor.walsh@intel.com (mailing list archive)
State Rejected, archived
Headers
Series fix unused but set variables |

Checks

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

Commit Message

Conor Walsh Nov. 12, 2021, 2:01 p.m. UTC
This patch removes the tot_ppi variable from the update_stats function
within empty poll in the power library as it is an unused but set
variable.

Bugzilla ID: 881

Fixes: 450f0791312c ("power: add traffic pattern aware power control")

Signed-off-by: Conor Walsh <conor.walsh@intel.com>
Reported-by: Liang Longfeng <longfengx.liang@intel.com>
---
 lib/power/rte_power_empty_poll.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
  

Comments

David Marchand Nov. 12, 2021, 2:13 p.m. UTC | #1
Hello Conor,


On Fri, Nov 12, 2021 at 3:02 PM Conor Walsh <conor.walsh@intel.com> wrote:
>
> This patch removes the tot_ppi variable from the update_stats function
> within empty poll in the power library as it is an unused but set
> variable.

About the commitlog, commenting on this patch, but it applies to other
of the series.
>
> Bugzilla ID: 881

No need for an empty line between bugzilla and fixes lines.

>
> Fixes: 450f0791312c ("power: add traffic pattern aware power control")

We will want those fixes in stable branches.
Cc: stable@dpdk.org

>
> Signed-off-by: Conor Walsh <conor.walsh@intel.com>
> Reported-by: Liang Longfeng <longfengx.liang@intel.com>

Reports come before signing off a fix :-)


Now, on this specific patch, Jim already provided a fix for this
issue, you can drop it from your series.
https://patchwork.dpdk.org/project/dpdk/patch/20211105155351.350403-1-james.r.harris@intel.com/
  
Conor Walsh Nov. 12, 2021, 2:17 p.m. UTC | #2
Hi David,

I will make those changes to the commit logs and respin them.
I'll also drop this patch from the set.

Thanks,
Conor.

> Hello Conor,
> 
> 
> On Fri, Nov 12, 2021 at 3:02 PM Conor Walsh <conor.walsh@intel.com>
> wrote:
> >
> > This patch removes the tot_ppi variable from the update_stats function
> > within empty poll in the power library as it is an unused but set
> > variable.
> 
> About the commitlog, commenting on this patch, but it applies to other
> of the series.
> >
> > Bugzilla ID: 881
> 
> No need for an empty line between bugzilla and fixes lines.
> 
> >
> > Fixes: 450f0791312c ("power: add traffic pattern aware power control")
> 
> We will want those fixes in stable branches.
> Cc: stable@dpdk.org
> 
> >
> > Signed-off-by: Conor Walsh <conor.walsh@intel.com>
> > Reported-by: Liang Longfeng <longfengx.liang@intel.com>
> 
> Reports come before signing off a fix :-)
> 
> 
> Now, on this specific patch, Jim already provided a fix for this
> issue, you can drop it from your series.
> https://patchwork.dpdk.org/project/dpdk/patch/20211105155351.350403-1-
> james.r.harris@intel.com/
> 
> 
> --
> David Marchand
  
David Marchand Nov. 12, 2021, 2:26 p.m. UTC | #3
On Fri, Nov 12, 2021 at 3:17 PM Walsh, Conor <conor.walsh@intel.com> wrote:
>
> Hi David,
>
> I will make those changes to the commit logs and respin them.
> I'll also drop this patch from the set.

These comments are trivial.

We might get more substantial comments from drivers maintainers.
I recommend waiting a bit before respinning.

Thanks.
  

Patch

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;