linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/3] tty: hvc_xen: hide xen_console_remove when unused
       [not found] <1453758918-3577213-1-git-send-email-arnd@arndb.de>
@ 2016-01-25 21:54 ` Arnd Bergmann
  2016-01-25 23:05   ` Boris Ostrovsky
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2016-01-25 21:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-arm-kernel, Arnd Bergmann, Jiri Slaby, David Vrabel,
	Julien Grall, Stefano Stabellini, Wei Liu, Jan Beulich,
	Boris Ostrovsky, linuxppc-dev, linux-kernel

xencons_disconnect_backend() is only called from xen_console_remove(),
which is conditionally compiled, so we get a harmless warning when
CONFIG_HVC_XEN_FRONTEND is unset:

hvc/hvc_xen.c:350:12: error: 'xen_console_remove' defined but not used [-Werror=unused-function]

This moves the function down into the same #ifdef section to silence
the warning.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/tty/hvc/hvc_xen.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers/tty/hvc/hvc_xen.c
index fa816b7193b6..11725422dacb 100644
--- a/drivers/tty/hvc/hvc_xen.c
+++ b/drivers/tty/hvc/hvc_xen.c
@@ -323,6 +323,7 @@ void xen_console_resume(void)
 	}
 }
 
+#ifdef CONFIG_HVC_XEN_FRONTEND
 static void xencons_disconnect_backend(struct xencons_info *info)
 {
 	if (info->irq > 0)
@@ -363,7 +364,6 @@ static int xen_console_remove(struct xencons_info *info)
 	return 0;
 }
 
-#ifdef CONFIG_HVC_XEN_FRONTEND
 static int xencons_remove(struct xenbus_device *dev)
 {
 	return xen_console_remove(dev_get_drvdata(&dev->dev));
-- 
2.7.0

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

* Re: [PATCH 3/3] tty: hvc_xen: hide xen_console_remove when unused
  2016-01-25 21:54 ` [PATCH 3/3] tty: hvc_xen: hide xen_console_remove when unused Arnd Bergmann
@ 2016-01-25 23:05   ` Boris Ostrovsky
  2016-01-26 12:25     ` Stefano Stabellini
  0 siblings, 1 reply; 3+ messages in thread
From: Boris Ostrovsky @ 2016-01-25 23:05 UTC (permalink / raw)
  To: Arnd Bergmann, Greg Kroah-Hartman
  Cc: linux-arm-kernel, Jiri Slaby, David Vrabel, Julien Grall,
	Stefano Stabellini, Wei Liu, Jan Beulich, linuxppc-dev,
	linux-kernel

On 01/25/2016 04:54 PM, Arnd Bergmann wrote:
> xencons_disconnect_backend() is only called from xen_console_remove(),

and also from xencons_probe()/xencons_resume(). But those two are also 
under the
same ifdef.

-boris

> which is conditionally compiled, so we get a harmless warning when
> CONFIG_HVC_XEN_FRONTEND is unset:
>
> hvc/hvc_xen.c:350:12: error: 'xen_console_remove' defined but not used [-Werror=unused-function]
>
> This moves the function down into the same #ifdef section to silence
> the warning.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>   drivers/tty/hvc/hvc_xen.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers/tty/hvc/hvc_xen.c
> index fa816b7193b6..11725422dacb 100644
> --- a/drivers/tty/hvc/hvc_xen.c
> +++ b/drivers/tty/hvc/hvc_xen.c
> @@ -323,6 +323,7 @@ void xen_console_resume(void)
>   	}
>   }
>   
> +#ifdef CONFIG_HVC_XEN_FRONTEND
>   static void xencons_disconnect_backend(struct xencons_info *info)
>   {
>   	if (info->irq > 0)
> @@ -363,7 +364,6 @@ static int xen_console_remove(struct xencons_info *info)
>   	return 0;
>   }
>   
> -#ifdef CONFIG_HVC_XEN_FRONTEND
>   static int xencons_remove(struct xenbus_device *dev)
>   {
>   	return xen_console_remove(dev_get_drvdata(&dev->dev));

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

* Re: [PATCH 3/3] tty: hvc_xen: hide xen_console_remove when unused
  2016-01-25 23:05   ` Boris Ostrovsky
@ 2016-01-26 12:25     ` Stefano Stabellini
  0 siblings, 0 replies; 3+ messages in thread
From: Stefano Stabellini @ 2016-01-26 12:25 UTC (permalink / raw)
  To: Boris Ostrovsky
  Cc: Arnd Bergmann, Greg Kroah-Hartman, linux-arm-kernel, Jiri Slaby,
	David Vrabel, Julien Grall, Stefano Stabellini, Wei Liu,
	Jan Beulich, linuxppc-dev, linux-kernel

On Mon, 25 Jan 2016, Boris Ostrovsky wrote:
> On 01/25/2016 04:54 PM, Arnd Bergmann wrote:
> > xencons_disconnect_backend() is only called from xen_console_remove(),
> 
> and also from xencons_probe()/xencons_resume(). But those two are also under
> the
> same ifdef.

Good point. Aside from this the patch is good.

 
> > which is conditionally compiled, so we get a harmless warning when
> > CONFIG_HVC_XEN_FRONTEND is unset:
> > 
> > hvc/hvc_xen.c:350:12: error: 'xen_console_remove' defined but not used
> > [-Werror=unused-function]
> > 
> > This moves the function down into the same #ifdef section to silence
> > the warning.
> > 
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > ---
> >   drivers/tty/hvc/hvc_xen.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers/tty/hvc/hvc_xen.c
> > index fa816b7193b6..11725422dacb 100644
> > --- a/drivers/tty/hvc/hvc_xen.c
> > +++ b/drivers/tty/hvc/hvc_xen.c
> > @@ -323,6 +323,7 @@ void xen_console_resume(void)
> >   	}
> >   }
> >   +#ifdef CONFIG_HVC_XEN_FRONTEND
> >   static void xencons_disconnect_backend(struct xencons_info *info)
> >   {
> >   	if (info->irq > 0)
> > @@ -363,7 +364,6 @@ static int xen_console_remove(struct xencons_info *info)
> >   	return 0;
> >   }
> >   -#ifdef CONFIG_HVC_XEN_FRONTEND
> >   static int xencons_remove(struct xenbus_device *dev)
> >   {
> >   	return xen_console_remove(dev_get_drvdata(&dev->dev));
> 

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

end of thread, other threads:[~2016-01-26 12:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1453758918-3577213-1-git-send-email-arnd@arndb.de>
2016-01-25 21:54 ` [PATCH 3/3] tty: hvc_xen: hide xen_console_remove when unused Arnd Bergmann
2016-01-25 23:05   ` Boris Ostrovsky
2016-01-26 12:25     ` Stefano Stabellini

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