Re: [PATCH 2/2] ACPI: processor: idle: Remove obsolete comment
From: Rafael J. Wysocki
Date: Thu Apr 03 2025 - 06:43:25 EST
On Thu, Apr 3, 2025 at 4:54 AM Zhang, Rui <rui.zhang@xxxxxxxxx> wrote:
>
> On Tue, 2025-04-01 at 14:13 +0200, Rafael J. Wysocki wrote:
> >
> > > So I'm proposing to return the index of the highest valid state
> > > directly
> > > in acpi_processor_power_verify() and then we don't need this loop any
> > > more.
> >
> > OK, so I'd prefer to first rename power.count to power.max_index
> > (which it really is) and then make the changes you have proposed.
>
> well, in other cases, like in acpi_processor_evaluate_cst() and in the
> _LPI case, power.count is still set and used as the total number of
> cstates.
>
> in this acpi_processor_get_cstate_info() case, maybe we should drop this
> change
> - working++;
> + working = i;
> So power.count is still consistent in all these cases.
OK
> For the current for loop that overrides power.count, I think we can just
> drop it, because no one checks power.count after it, which means no one
> actually uses power.count as max_index.
Sounds good to me.