PM: Fix compilation warning in kernel/power/main.c
Subsystems (3)
PATCH 1/1 PM: Fix compilation warning in kernel/power/main.c
Reorder the code in kernel/power/main.c to fix compilation warning triggered by unsetting CONFIG_SUSPEND.
--- kernel/power/main.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-)
kernel/power/main.c +13 -13
@@ -57,16 +57,6 @@ int pm_notifier_call_chain(unsigned long#ifdef CONFIG_PM_DEBUG int pm_test_level =TEST_NONE ; -static int suspend_test (int level) -{ -if (pm_test_level == level) { -printk (KERN_INFO "suspend debug: Waiting for 5 seconds.\n" ); -mdelay (5000 ); -return 1 ; - } -return 0 ; -} -static const char *const pm_tests[__TEST_AFTER_LAST] = { [TEST_NONE ] ="none" , [TEST_CORE] = "core",
@@ -125,14 +115,24 @@ static ssize_t pm_test_store(struct kobj }power_attr (pm_test); -#else /* !CONFIG_PM_DEBUG */ -static inline int suspend_test (int level) {return 0 ; } -#endif /* !CONFIG_PM_DEBUG */ +#endif /* CONFIG_PM_DEBUG */ #endif /* CONFIG_PM_SLEEP */ #ifdef CONFIG_SUSPEND +static int suspend_test (int level) +{ +#ifdef CONFIG_PM_DEBUG +if (pm_test_level == level) { +printk (KERN_INFO "suspend debug: Waiting for 5 seconds.\n" ); +mdelay (5000 ); +return 1 ; + } +#endif /* !CONFIG_PM_DEBUG */ +return 0 ; +} +#ifdef CONFIG_PM_TEST_SUSPEND /*
applied
thanks,
--
Len Brown, Intel Open Source Technology Center
Quoted 64 lines · Rafael J. Wysocki
Reorder the code in
kernel/power/main.cto fix compilation warning triggered by unsettingCONFIG_SUSPEND.Signed-off-by Rafael J. Wysocki <[email protected]>--- kernel/power/main.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-)Index:
linux-2.6/kernel/power/main.c
===================================================================kernel/power/main.c +13
-14@@ -57,16 +57,6 @@ int pm_notifier_call_chain(unsigned long#ifdef CONFIG_PM_DEBUG int pm_test_level =TEST_NONE ; -static int suspend_test (int level) -{ -if (pm_test_level == level) { -printk (KERN_INFO "suspend debug: Waiting for 5 seconds.\n" ); -mdelay (5000 ); -return 1 ; - } -return 0 ; -} -static const char *const pm_tests[__TEST_AFTER_LAST] = { [TEST_NONE ] ="none" , [TEST_CORE] = "core",@@ -125,14 +115,24 @@ static ssize_t pm_test_store(struct kobj }power_attr (pm_test); -#else /* !CONFIG_PM_DEBUG */ -static inline int suspend_test (int level) {return 0 ; } -#endif /* !CONFIG_PM_DEBUG */ +#endif /* CONFIG_PM_DEBUG */ #endif /* CONFIG_PM_SLEEP */ #ifdef CONFIG_SUSPEND +static int suspend_test (int level) +{ +#ifdef CONFIG_PM_DEBUG +if (pm_test_level == level) { +printk (KERN_INFO "suspend debug: Waiting for 5 seconds.\n" ); +mdelay (5000 ); +return 1 ; + } +#endif /* !CONFIG_PM_DEBUG */ +return 0 ; +} +#ifdef CONFIG_PM_TEST_SUSPEND /* -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
applied
thanks,
--
Len Brown, Intel Open Source Technology Center
Quoted 64 lines · Rafael J. Wysocki
Reorder the code in
kernel/power/main.cto fix compilation warning triggered by unsettingCONFIG_SUSPEND.Signed-off-by Rafael J. Wysocki <[email protected]>--- kernel/power/main.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-)Index:
linux-2.6/kernel/power/main.c
===================================================================kernel/power/main.c +13
-14@@ -57,16 +57,6 @@ int pm_notifier_call_chain(unsigned long#ifdef CONFIG_PM_DEBUG int pm_test_level =TEST_NONE ; -static int suspend_test (int level) -{ -if (pm_test_level == level) { -printk (KERN_INFO "suspend debug: Waiting for 5 seconds.\n" ); -mdelay (5000 ); -return 1 ; - } -return 0 ; -} -static const char *const pm_tests[__TEST_AFTER_LAST] = { [TEST_NONE ] ="none" , [TEST_CORE] = "core",@@ -125,14 +115,24 @@ static ssize_t pm_test_store(struct kobj }power_attr (pm_test); -#else /* !CONFIG_PM_DEBUG */ -static inline int suspend_test (int level) {return 0 ; } -#endif /* !CONFIG_PM_DEBUG */ +#endif /* CONFIG_PM_DEBUG */ #endif /* CONFIG_PM_SLEEP */ #ifdef CONFIG_SUSPEND +static int suspend_test (int level) +{ +#ifdef CONFIG_PM_DEBUG +if (pm_test_level == level) { +printk (KERN_INFO "suspend debug: Waiting for 5 seconds.\n" ); +mdelay (5000 ); +return 1 ; + } +#endif /* !CONFIG_PM_DEBUG */ +return 0 ; +} +#ifdef CONFIG_PM_TEST_SUSPEND /* -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html