]> xenbits.xensource.com Git - people/iwj/xen.git/commitdiff
x86/acpi: Drop sleep_states[] and associated print messages
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 29 Aug 2019 12:28:15 +0000 (13:28 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 2 Sep 2019 14:39:44 +0000 (15:39 +0100)
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 <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/acpi/power.c

index d83e8cdd5293bdf63b29de491fa024c402250bd5..6ae9e29229a6ba7f075ea7c10c19c3285da960fe 100644 (file)
@@ -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);