linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Randy Dunlap <randy.dunlap@oracle.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
	linux-pm@lists.linux-foundation.org, linux-next@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: linux-next: Tree for May 25 (kernel/power, SUSPEND=n)
Date: Tue, 25 May 2010 12:49:23 -0700	[thread overview]
Message-ID: <4BFC29C3.1080005@oracle.com> (raw)
In-Reply-To: <201005252124.52108.rjw@sisk.pl>

On 05/25/10 12:24, Rafael J. Wysocki wrote:
> On Tuesday 25 May 2010, Randy Dunlap wrote:
>> On Tue, 25 May 2010 14:26:57 +1000 Stephen Rothwell wrote:
>>
>>> Hi all,
>>>
>>> We are in the merge window again.  I remind you all not to add stuff for
>>> 2.6.36 to your linux-next trees until after 2.6.35-rc1.
>>
>>
>> when CONFIG_SUSPEND=n, CONFIG_OPPORTUNISTIC_SUSPEND=n, CONFIG_PM=y:
>>
>> kernel/power/main.c:66: error: 'pm_states' undeclared (first use in this function)
> 
> Thanks, the patch below fixes this.
> 
> Rafael
> 
> ---
> From: Rafael J. Wysocki <rjw@sisk.pl>
> Subject: PM: Fix build with CONFIG_SUSPEND unset
> 
> If CONFIG_SUSPEND is unset, pm_state_valid() doesn't build because
> the pm_states[] array is not defined, but pm_state_valid() is only
> used under #ifdef CONFIG_SUSPEND, so don't try to build it if
> CONFIG_SUSPEND is unset.
> 
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>

Acked-by: Randy Dunlap <randy.dunlap@oracle.com>

Thanks.


> ---
>  kernel/power/main.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> Index: linux-2.6/kernel/power/main.c
> ===================================================================
> --- linux-2.6.orig/kernel/power/main.c
> +++ linux-2.6/kernel/power/main.c
> @@ -61,10 +61,12 @@ static inline int pm_enter_state(int sta
>  
>  static inline bool hibernation_supported(void) { return true; }
>  
> +#ifdef CONFIG_SUSPEND
>  static inline bool pm_state_valid(int state_idx)
>  {
>  	return pm_states[state_idx] && valid_state(state_idx);
>  }
> +#endif /* CONFIG_SUSPEND */
>  
>  static inline int pm_enter_state(int state_idx)
>  {


-- 
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

  reply	other threads:[~2010-05-25 19:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-25  4:26 linux-next: Tree for May 25 Stephen Rothwell
2010-05-25 15:49 ` linux-next: Tree for May 25 (kernel/power, SUSPEND=n) Randy Dunlap
2010-05-25 19:24   ` Rafael J. Wysocki
2010-05-25 19:49     ` Randy Dunlap [this message]
     [not found] ` <20100525142657.c2ae7804.sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
2010-05-25 17:23   ` linux-next: Tree for May 25 (infiniband/hw/qib) Randy Dunlap

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=4BFC29C3.1080005@oracle.com \
    --to=randy.dunlap@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=rjw@sisk.pl \
    --cc=sfr@canb.auug.org.au \
    /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;
as well as URLs for NNTP newsgroup(s).