* [PATCH] PM: Fix compilation warning in kernel/power/main.c
@ 2009-01-16 23:10 Rafael J. Wysocki
2009-01-16 23:14 ` Len Brown
2009-01-16 23:14 ` Len Brown
0 siblings, 2 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2009-01-16 23:10 UTC (permalink / raw)
To: Len Brown; +Cc: Andrew Morton, LKML, ACPI Devel Maling List, pm list
Reorder the code in kernel/power/main.c to fix compilation warning
triggered by unsetting CONFIG_SUSPEND.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
kernel/power/main.c | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
Index: linux-2.6/kernel/power/main.c
===================================================================
--- linux-2.6.orig/kernel/power/main.c
+++ linux-2.6/kernel/power/main.c
@@ -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
/*
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] PM: Fix compilation warning in kernel/power/main.c
2009-01-16 23:10 [PATCH] PM: Fix compilation warning in kernel/power/main.c Rafael J. Wysocki
@ 2009-01-16 23:14 ` Len Brown
2009-01-16 23:14 ` Len Brown
1 sibling, 0 replies; 4+ messages in thread
From: Len Brown @ 2009-01-16 23:14 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: ACPI Devel Maling List, Andrew Morton, LKML, pm list
applied
thanks,
--
Len Brown, Intel Open Source Technology Center
On Sat, 17 Jan 2009, Rafael J. Wysocki wrote:
>
> Reorder the code in kernel/power/main.c to fix compilation warning
> triggered by unsetting CONFIG_SUSPEND.
>
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> ---
> kernel/power/main.c | 26 +++++++++++++-------------
> 1 file changed, 13 insertions(+), 13 deletions(-)
>
> Index: linux-2.6/kernel/power/main.c
> ===================================================================
> --- linux-2.6.orig/kernel/power/main.c
> +++ linux-2.6/kernel/power/main.c
> @@ -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 majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] PM: Fix compilation warning in kernel/power/main.c
2009-01-16 23:10 [PATCH] PM: Fix compilation warning in kernel/power/main.c Rafael J. Wysocki
2009-01-16 23:14 ` Len Brown
@ 2009-01-16 23:14 ` Len Brown
1 sibling, 0 replies; 4+ messages in thread
From: Len Brown @ 2009-01-16 23:14 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: Andrew Morton, LKML, ACPI Devel Maling List, pm list
applied
thanks,
--
Len Brown, Intel Open Source Technology Center
On Sat, 17 Jan 2009, Rafael J. Wysocki wrote:
>
> Reorder the code in kernel/power/main.c to fix compilation warning
> triggered by unsetting CONFIG_SUSPEND.
>
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> ---
> kernel/power/main.c | 26 +++++++++++++-------------
> 1 file changed, 13 insertions(+), 13 deletions(-)
>
> Index: linux-2.6/kernel/power/main.c
> ===================================================================
> --- linux-2.6.orig/kernel/power/main.c
> +++ linux-2.6/kernel/power/main.c
> @@ -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 majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] PM: Fix compilation warning in kernel/power/main.c
@ 2009-01-16 23:10 Rafael J. Wysocki
0 siblings, 0 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2009-01-16 23:10 UTC (permalink / raw)
To: Len Brown; +Cc: ACPI Devel Maling List, Andrew Morton, LKML, pm list
Reorder the code in kernel/power/main.c to fix compilation warning
triggered by unsetting CONFIG_SUSPEND.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
kernel/power/main.c | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
Index: linux-2.6/kernel/power/main.c
===================================================================
--- linux-2.6.orig/kernel/power/main.c
+++ linux-2.6/kernel/power/main.c
@@ -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
/*
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-01-16 23:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-16 23:10 [PATCH] PM: Fix compilation warning in kernel/power/main.c Rafael J. Wysocki
2009-01-16 23:14 ` Len Brown
2009-01-16 23:14 ` Len Brown
-- strict thread matches above, loose matches on Subject: below --
2009-01-16 23:10 Rafael J. Wysocki
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.