From: Andrew Cooper Date: Thu, 29 Aug 2019 12:28:15 +0000 (+0100) Subject: x86/acpi: Drop sleep_states[] and associated print messages X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=f92d95f4749c7ad7e074a98ca18e29c7898964fb;p=people%2Fiwj%2Fxen.git x86/acpi: Drop sleep_states[] and associated print messages sleep_states[] is a write-only array, and despite the loop logic, the printed message is consistently "ACPI sleep modes: S3". Drop it all. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich --- diff --git a/xen/arch/x86/acpi/power.c b/xen/arch/x86/acpi/power.c index d83e8cdd52..6ae9e29229 100644 --- a/xen/arch/x86/acpi/power.c +++ b/xen/arch/x86/acpi/power.c @@ -36,7 +36,6 @@ uint32_t system_reset_counter = 1; static char __initdata opt_acpi_sleep[20]; string_param("acpi_sleep", opt_acpi_sleep); -static u8 sleep_states[ACPI_S_STATE_COUNT]; static DEFINE_SPINLOCK(pm_lock); struct acpi_sleep_info acpi_sinfo; @@ -460,7 +459,6 @@ acpi_status acpi_enter_sleep_state(u8 sleep_state) static int __init acpi_sleep_init(void) { - int i; char *p = opt_acpi_sleep; while ( (p != NULL) && (*p != '\0') ) @@ -474,19 +472,6 @@ static int __init acpi_sleep_init(void) p += strspn(p, ", \t"); } - printk(XENLOG_INFO "ACPI sleep modes:"); - for ( i = 0; i < ACPI_S_STATE_COUNT; i++ ) - { - if ( i == ACPI_STATE_S3 ) - { - sleep_states[i] = 1; - printk(" S%d", i); - } - else - sleep_states[i] = 0; - } - printk("\n"); - return 0; } __initcall(acpi_sleep_init);