mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zhang Rui <rui.zhang@intel.com>
To: rafael.j.wysocki@intel.com
Cc: ggherdovich@suse.cz, linux-kernel@vger.kernel.org,
	linux-pm@vger.kernel.org, linux-acpi@vger.kernel.org
Subject: [PATCH 2/2] ACPI: processor: idle: Remove redundant pr->power.count assignment
Date: Wed,  9 Apr 2025 08:50:26 +0800	[thread overview]
Message-ID: <20250409005026.1932637-3-rui.zhang@intel.com> (raw)
In-Reply-To: <20250409005026.1932637-1-rui.zhang@intel.com>

pr->power.count stands for the number of valid processor cstates. And it
is correctly set with the return value of acpi_processor_power_verify(),
in acpi_processor_get_cstate_info().

Remove the redundant logic that unnecessarily overrides pr->power.count
value.

No functional change intended.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
---
 drivers/acpi/processor_idle.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 7264444d56b8..623c415790b0 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -483,12 +483,6 @@ static int acpi_processor_get_cstate_info(struct acpi_processor *pr)
 	pr->power.count = acpi_processor_power_verify(pr);
 	pr->flags.power = 1;
 
-	for (i = 1; i < ACPI_PROCESSOR_MAX_POWER; i++) {
-		if (pr->power.states[i].valid) {
-			pr->power.count = i;
-		}
-	}
-
 	return 0;
 }
 
-- 
2.43.0


  parent reply	other threads:[~2025-04-09  0:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-09  0:50 [PATCH 0/2] ACPI: processor: idle: acpi_processor_get_cstate_info() cleanup Zhang Rui
2025-04-09  0:50 ` [PATCH 1/2] ACPI: processor: idle: Set pr->flags.power unconditionally Zhang Rui
2025-04-09  0:50 ` Zhang Rui [this message]
2025-04-17  7:37 ` [PATCH 0/2] ACPI: processor: idle: acpi_processor_get_cstate_info() cleanup Giovanni Gherdovich

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=20250409005026.1932637-3-rui.zhang@intel.com \
    --to=rui.zhang@intel.com \
    --cc=ggherdovich@suse.cz \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael.j.wysocki@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

all inboxes | Powered by JetHome®