mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
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 <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>
This commit is contained in:
committed by
Rafael J. Wysocki
parent
8fa2f8bd6a
commit
0edd1d13de
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user