linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xen: ifdef CONFIG_HIBERNATE_CALLBACKS xen_*_suspend
@ 2013-06-27 13:28 Stefano Stabellini
  2013-06-27 20:10 ` konrad wilk
  0 siblings, 1 reply; 2+ messages in thread
From: Stefano Stabellini @ 2013-06-27 13:28 UTC (permalink / raw)
  To: konrad.wilk
  Cc: linux-kernel, stefano.stabellini, xen-devel, Stefano Stabellini

xen_hvm_post_suspend, xen_pre_suspend, xen_post_suspend are only used if
CONFIG_HIBERNATE_CALLBACKS is defined, resulting in:

drivers/xen/manage.c:46:13: warning: ‘xen_hvm_post_suspend’ defined but not used [-Wunused-function]
drivers/xen/manage.c:52:13: warning: ‘xen_pre_suspend’ defined but not used [-Wunused-function]
drivers/xen/manage.c:59:13: warning: ‘xen_post_suspend’ defined but not used [-Wunused-function]

If the kernel config is missing CONFIG_HIBERNATE_CALLBACKS.

Simply ifdef CONFIG_HIBERNATE_CALLBACKS the three functions.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
 drivers/xen/manage.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c
index 412b96c..b1005d4 100644
--- a/drivers/xen/manage.c
+++ b/drivers/xen/manage.c
@@ -43,6 +43,7 @@ struct suspend_info {
 	void (*post)(int cancelled);
 };
 
+#ifdef CONFIG_HIBERNATE_CALLBACKS
 static void xen_hvm_post_suspend(int cancelled)
 {
 	xen_arch_hvm_post_suspend(cancelled);
@@ -63,7 +64,6 @@ static void xen_post_suspend(int cancelled)
 	xen_mm_unpin_all();
 }
 
-#ifdef CONFIG_HIBERNATE_CALLBACKS
 static int xen_suspend(void *data)
 {
 	struct suspend_info *si = data;
-- 
1.7.2.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] xen: ifdef CONFIG_HIBERNATE_CALLBACKS xen_*_suspend
  2013-06-27 13:28 [PATCH] xen: ifdef CONFIG_HIBERNATE_CALLBACKS xen_*_suspend Stefano Stabellini
@ 2013-06-27 20:10 ` konrad wilk
  0 siblings, 0 replies; 2+ messages in thread
From: konrad wilk @ 2013-06-27 20:10 UTC (permalink / raw)
  To: Stefano Stabellini; +Cc: linux-kernel, stefano.stabellini, xen-devel


On 6/27/2013 9:28 AM, Stefano Stabellini wrote:
> xen_hvm_post_suspend, xen_pre_suspend, xen_post_suspend are only used if
> CONFIG_HIBERNATE_CALLBACKS is defined, resulting in:
>
> drivers/xen/manage.c:46:13: warning: ‘xen_hvm_post_suspend’ defined but not used [-Wunused-function]
> drivers/xen/manage.c:52:13: warning: ‘xen_pre_suspend’ defined but not used [-Wunused-function]
> drivers/xen/manage.c:59:13: warning: ‘xen_post_suspend’ defined but not used [-Wunused-function]
>
> If the kernel config is missing CONFIG_HIBERNATE_CALLBACKS.
>
> Simply ifdef CONFIG_HIBERNATE_CALLBACKS the three functions.
>
> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> ---
>   drivers/xen/manage.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c
> index 412b96c..b1005d4 100644
> --- a/drivers/xen/manage.c
> +++ b/drivers/xen/manage.c
> @@ -43,6 +43,7 @@ struct suspend_info {
>   	void (*post)(int cancelled);
>   };
>   
> +#ifdef CONFIG_HIBERNATE_CALLBACKS
>   static void xen_hvm_post_suspend(int cancelled)
>   {
>   	xen_arch_hvm_post_suspend(cancelled);
> @@ -63,7 +64,6 @@ static void xen_post_suspend(int cancelled)
>   	xen_mm_unpin_all();
>   }
>   
> -#ifdef CONFIG_HIBERNATE_CALLBACKS
>   static int xen_suspend(void *data)
>   {
>   	struct suspend_info *si = data;
Looks ok. Will queue it up for 3.11


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-06-27 20:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-27 13:28 [PATCH] xen: ifdef CONFIG_HIBERNATE_CALLBACKS xen_*_suspend Stefano Stabellini
2013-06-27 20:10 ` konrad wilk

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).