Skip to content

Commit 0edd1d1

Browse files
zhang-ruirafaeljw
authored andcommitted
ACPI: processor: idle: Remove redundant pr->power.count assignment
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 <[email protected]> Link: https://patch.msgid.link/[email protected] [ rjw: Removed unused variable, fixed up white space ] Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 8fa2f8b commit 0edd1d1

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
@@ -461,10 +461,8 @@ static int acpi_processor_power_verify(struct acpi_processor *pr)
461461

462462
static int acpi_processor_get_cstate_info(struct acpi_processor *pr)
463463
{
464-
unsigned int i;
465464
int result;
466465

467-
468466
/* NOTE: the idle thread may not be running while calling
469467
* this function */
470468

@@ -483,12 +481,6 @@ static int acpi_processor_get_cstate_info(struct acpi_processor *pr)
483481
pr->power.count = acpi_processor_power_verify(pr);
484482
pr->flags.power = 1;
485483

486-
for (i = 1; i < ACPI_PROCESSOR_MAX_POWER; i++) {
487-
if (pr->power.states[i].valid) {
488-
pr->power.count = i;
489-
}
490-
}
491-
492484
return 0;
493485
}
494486

0 commit comments

Comments
 (0)