public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Zhang, Rui" <rui.zhang@intel.com>
To: "rafael@kernel.org" <rafael@kernel.org>
Cc: "ggherdovich@suse.cz" <ggherdovich@suse.cz>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"lenb@kernel.org" <lenb@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>
Subject: Re: [PATCH 2/2] ACPI: processor: idle: Remove obsolete comment
Date: Thu, 3 Apr 2025 01:11:53 +0000	[thread overview]
Message-ID: <29626e175f3238ae04451477e38bad875794a61c.camel@intel.com> (raw)
In-Reply-To: <CAJZ5v0juH2kYx-fyyfoFLBTjg30y59Dwj1wBYXxuHvU2c7X31w@mail.gmail.com>

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.

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.

-rui

  reply	other threads:[~2025-04-03  2:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-28 14:30 [PATCH 1/2] ACPI: processor: idle: Return an error if both P_LVL{2,3} idle states are invalid Giovanni Gherdovich
2025-03-28 14:30 ` [PATCH 2/2] ACPI: processor: idle: Remove obsolete comment Giovanni Gherdovich
2025-03-31  7:38   ` Zhang, Rui
2025-03-31 12:07     ` Rafael J. Wysocki
2025-04-01  0:25       ` Zhang, Rui
2025-04-01 12:13         ` Rafael J. Wysocki
2025-04-03  1:11           ` Zhang, Rui [this message]
2025-04-03 10:42             ` Rafael J. Wysocki
2025-04-09  0:54   ` Zhang, Rui
2025-04-09 12:54     ` Rafael J. Wysocki
2025-03-31  1:08 ` [PATCH 1/2] ACPI: processor: idle: Return an error if both P_LVL{2,3} idle states are invalid Zhang, Rui
2025-03-31 12:02   ` Rafael J. Wysocki

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=29626e175f3238ae04451477e38bad875794a61c.camel@intel.com \
    --to=rui.zhang@intel.com \
    --cc=ggherdovich@suse.cz \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael@kernel.org \
    /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