DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Jim Harris <james.r.harris@intel.com>
Cc: dev <dev@dpdk.org>, David Hunt <david.hunt@intel.com>,
	David Marchand <david.marchand@redhat.com>
Subject: Re: [dpdk-dev] [PATCH] power: fix unused-but-set variable error
Date: Thu, 04 Nov 2021 18:32:06 +0100	[thread overview]
Message-ID: <6106734.XMRzD8n4ft@thomas> (raw)
In-Reply-To: <CAJFAV8xZXqgqgmK5HFAtdXTFWF-cFuPxNMOuN-OeHbm+w4tRrg@mail.gmail.com>

29/10/2021 20:53, David Marchand:
> On Fri, Oct 29, 2021 at 7:17 PM Jim Harris <james.r.harris@intel.com> wrote:
> >
> > 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.
> 
> Dead code, from the start...
> Fixes: 450f0791312c ("power: add traffic pattern aware power control")
> 
> > @@ -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];
> >         }
> 
> I don't think keeping ppi_av[] (and related data struct) is that
> useful.. but in any case patch lgtm:
> 
> Reviewed-by: David Marchand <david.marchand@redhat.com>

I understand that a v2 removing ppi_av would be better.




      reply	other threads:[~2021-11-04 17:32 UTC|newest]

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

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=6106734.XMRzD8n4ft@thomas \
    --to=thomas@monjalon.net \
    --cc=david.hunt@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=james.r.harris@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).