Re: [PATCH] cpupower : frequency-set -r option misses the last cpu in related cpu list

From: Thomas Renninger
Date: Wed May 29 2019 - 10:24:38 EST


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@xxxxxxx>

Thanks!

Thomas