From: Len Brown <lenb@kernel.org>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>,
ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
pm list <linux-pm@lists.linux-foundation.org>
Subject: Re: [PATCH] PM: Fix compilation warning in kernel/power/main.c
Date: Fri, 16 Jan 2009 18:14:07 -0500 (EST) [thread overview]
Message-ID: <alpine.LFD.2.00.0901161813480.31281@localhost.localdomain> (raw)
In-Reply-To: <200901170010.45699.rjw@sisk.pl>
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
>
prev parent reply other threads:[~2009-01-16 23:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.2.00.0901161813480.31281@localhost.localdomain \
--to=lenb@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=rjw@sisk.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox