Skip to content

Commit eafd231

Browse files
committed
ACPI: processor: idle: Remove redundant pr->power.count assignment
JIRA: https://issues.redhat.com/browse/RHEL-114091 commit 0edd1d1 Author: Zhang Rui <rui.zhang@intel.com> Date: Thu, 10 Apr 2025 14:17:12 +0000 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> Link: https://patch.msgid.link/20250409005026.1932637-3-rui.zhang@intel.com [ rjw: Removed unused variable, fixed up white space ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
1 parent 708e994 commit eafd231

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

drivers/acpi/processor_idle.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -469,10 +469,8 @@ static int acpi_processor_power_verify(struct acpi_processor *pr)
469469

470470
static int acpi_processor_get_cstate_info(struct acpi_processor *pr)
471471
{
472-
unsigned int i;
473472
int result;
474473

475-
476474
/* NOTE: the idle thread may not be running while calling
477475
* this function */
478476

@@ -491,12 +489,6 @@ static int acpi_processor_get_cstate_info(struct acpi_processor *pr)
491489
pr->power.count = acpi_processor_power_verify(pr);
492490
pr->flags.power = 1;
493491

494-
for (i = 1; i < ACPI_PROCESSOR_MAX_POWER; i++) {
495-
if (pr->power.states[i].valid) {
496-
pr->power.count = i;
497-
}
498-
}
499-
500492
return 0;
501493
}
502494

0 commit comments

Comments
 (0)