]> Gentwo Git Trees - linux/.git/commit
ACPI: processor: idle: Drop redundant C-state count checks
authorHuisong Li <lihuisong@huawei.com>
Wed, 5 Nov 2025 09:36:47 +0000 (17:36 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 7 Nov 2025 17:47:58 +0000 (18:47 +0100)
commit77ca1612b80154c62d4002a3e303bc2c2999aac7
tree53feb947a84374c307afa74b82cbef90c391d40e
parent945661d581c50cb67fc04291d374156f4d807fe3
ACPI: processor: idle: Drop redundant C-state count checks

acpi_processor_setup_cstates() and acpi_processor_setup_cpuidle_cx()
are called after successfully obtaining power information. Among other
things, these setup functions check the C-state count against zero.

However, that check is done by acpi_processor_get_power_info_cst()
which will cause acpi_processor_get_power_info() to fail if it does
no pass, so the checks in the two functions mentioned above are
redundant.

Drop those redundant checks.

No intentional functional impact.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
[ rjw: Subject and changelog rewrite ]
Link: https://patch.msgid.link/20251105093647.3557248-1-lihuisong@huawei.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/processor_idle.c