lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 25 May 2010 12:49:23 -0700
From:	Randy Dunlap <randy.dunlap@...cle.com>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
CC:	Stephen Rothwell <sfr@...b.auug.org.au>,
	linux-pm@...ts.linux-foundation.org, linux-next@...r.kernel.org,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: linux-next: Tree for May 25 (kernel/power, SUSPEND=n)

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@...k.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@...k.pl>

Acked-by: Randy Dunlap <randy.dunlap@...cle.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 ***
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ