diff options
| author | Zhang Rui <[email protected]> | 2025-04-09 00:50:26 +0000 |
|---|---|---|
| committer | Rafael J. Wysocki <[email protected]> | 2025-04-10 12:17:12 +0000 |
| commit | 0edd1d13de5eb325dd9a6b39fccfc52d022effe2 (patch) | |
| tree | 567f5a8fe45cf9551a793f2de56fb841d02ca839 /drivers/acpi/processor_idle.c | |
| parent | ACPI: processor: idle: Set pr->flags.power unconditionally (diff) | |
| download | kernel-0edd1d13de5eb325dd9a6b39fccfc52d022effe2.tar.gz kernel-0edd1d13de5eb325dd9a6b39fccfc52d022effe2.zip | |
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]>
Diffstat (limited to 'drivers/acpi/processor_idle.c')
| -rw-r--r-- | drivers/acpi/processor_idle.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 7264444d56b8..e2febca2ec13 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -461,10 +461,8 @@ static int acpi_processor_power_verify(struct acpi_processor *pr) static int acpi_processor_get_cstate_info(struct acpi_processor *pr) { - unsigned int i; int result; - /* NOTE: the idle thread may not be running while calling * this function */ @@ -483,12 +481,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; } |
