LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Thomas Renninger <trenn@suse.de>
To: ego@linux.vnet.ibm.com
Cc: Abhishek Goel <huntbag@linux.vnet.ibm.com>,
	shuah@kernel.org, LKML <linux-kernel@vger.kernel.org>,
	Linux PM list <linux-pm@vger.kernel.org>
Subject: Re: [PATCH] cpupower : frequency-set -r option misses the last cpu in related cpu list
Date: Wed, 29 May 2019 16:21:08 +0200	[thread overview]
Message-ID: <1825219.HmmgU4QcfA@house> (raw)
In-Reply-To: <CAHZ_5Ww2fMBGUR4gzNRZs-uV16j-hAevxT-vbNULRPsmKA7dow@mail.gmail.com>

Hi,

On Wednesday, May 29, 2019 2:12:34 PM CEST Gautham R Shenoy wrote:
> Hi Abhishek,
> 
> On Wed, May 29, 2019 at 3:02 PM Abhishek Goel

...
 
> >                                 bitmask_setbit(cpus_chosen, cpus->cpu);
> >                                 cpus = cpus->next;
> >                         
> >                         }
> > 
> > +                       /* Set the last cpu in related cpus list */
> > +                       bitmask_setbit(cpus_chosen, cpus->cpu);
> 
> Perhaps you could convert the while() loop to a do ..  while(). That
> should will ensure
> that we terminate the loop after setting the last valid CPU.

It would do exactly the same, right?
IMHO it's not worth the extra hassle of resubmitting. Setting the last value 
outside a while loop is rather common.

I do not have a CPU with related cores at hand.
If you tested this it would be nice to see this pushed:

Reviewed-by: Thomas Renninger <trenn@suse.de>

Thanks!

   Thomas

  reply	other threads:[~2019-05-29 14:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-29  9:30 Abhishek Goel
2019-05-29 12:12 ` Gautham R Shenoy
2019-05-29 14:21   ` Thomas Renninger [this message]
2019-06-04 15:16     ` shuah

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=1825219.HmmgU4QcfA@house \
    --to=trenn@suse.de \
    --cc=ego@linux.vnet.ibm.com \
    --cc=huntbag@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=shuah@kernel.org \
    --subject='Re: [PATCH] cpupower : frequency-set -r option misses the last cpu in related cpu list' \
    /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

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).