]> git.hungrycats.org Git - linux/commit
ACPI: processor: idle: Remove redundant static variable and rename cstate check function
authorHuisong Li <lihuisong@huawei.com>
Wed, 11 Mar 2026 06:50:38 +0000 (14:50 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Sep 2026 11:36:19 +0000 (13:36 +0200)
commit4ba887b2bacc84f79d1067cc2d25e4bc9ecba7f5
treedff86c21e6743278966251fcd6df9294149fa004
parente1cfb85ab258ce05df6ebdf466d597de2f636e4e
ACPI: processor: idle: Remove redundant static variable and rename cstate check function

[ Upstream commit 4d613fb1ea0516e1f69d3a4ebfbf2572d5da5368 ]

The function acpi_processor_cstate_first_run_checks() is currently called
only once during initialization in acpi_processor_register_idle_driver().

Since its execution is already limited by the caller's lifecycle, the
internal static 'first_run' variable is redundant and can be safely
removed.

Additionally, the current function name is no longer descriptive of its
behavior, so rename the function to acpi_processor_update_max_cstate()
to better reflect its actual purpose.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Link: https://patch.msgid.link/20260311065038.4151558-4-lihuisong@huawei.com
[ rjw: Changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Stable-dep-of: 66c62e6773c5 ("ACPI: processor: Add cpuidle driver check in acpi_processor_register_idle_driver()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/acpi/processor_idle.c