Commit 0edd1d13 authored by Zhang Rui's avatar Zhang Rui Committed by Rafael J. Wysocki
Browse files

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: default avatarZhang 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: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 8fa2f8bd
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -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;
}