* [PATCH] Fix drivers/char/cyclades.c warning with CONFIG_PCI=n
@ 2007-07-22 18:23 Gabriel C
2007-07-22 20:13 ` Jiri Slaby
0 siblings, 1 reply; 2+ messages in thread
From: Gabriel C @ 2007-07-22 18:23 UTC (permalink / raw)
To: Linux Kernel Mailing List; +Cc: Jiri Slaby
Hi,
when CONFIG_PCI is not set I get this warning :
...
drivers/char/cyclades.c: In function 'cy_init':
drivers/char/cyclades.c:5488: warning: label 'err_unr' defined but not used
...
Signed-off-by: Gabriel Craciunescu <nix.or.die@googlemail.com>
---
diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c
index 9e0adfe..1fa0bda 100644
--- a/drivers/char/cyclades.c
+++ b/drivers/char/cyclades.c
@@ -5485,8 +5485,11 @@ static int __init cy_init(void)
#endif
return 0;
+
+#ifdef CONFIG_PCI
err_unr:
tty_unregister_driver(cy_serial_driver);
+#endif
err_frtty:
put_tty_driver(cy_serial_driver);
err:
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Fix drivers/char/cyclades.c warning with CONFIG_PCI=n
2007-07-22 18:23 [PATCH] Fix drivers/char/cyclades.c warning with CONFIG_PCI=n Gabriel C
@ 2007-07-22 20:13 ` Jiri Slaby
0 siblings, 0 replies; 2+ messages in thread
From: Jiri Slaby @ 2007-07-22 20:13 UTC (permalink / raw)
To: Gabriel C; +Cc: Linux Kernel Mailing List
Gabriel C napsal(a):
> Hi,
>
> when CONFIG_PCI is not set I get this warning :
>
> ...
>
> drivers/char/cyclades.c: In function 'cy_init':
> drivers/char/cyclades.c:5488: warning: label 'err_unr' defined but not used
>
> ...
>
>
> Signed-off-by: Gabriel Craciunescu <nix.or.die@googlemail.com>
>
> ---
>
> diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c
> index 9e0adfe..1fa0bda 100644
> --- a/drivers/char/cyclades.c
> +++ b/drivers/char/cyclades.c
> @@ -5485,8 +5485,11 @@ static int __init cy_init(void)
> #endif
>
> return 0;
> +
> +#ifdef CONFIG_PCI
> err_unr:
> tty_unregister_driver(cy_serial_driver);
> +#endif
> err_frtty:
> put_tty_driver(cy_serial_driver);
> err:
NAK
remove the ifdef at all. pci_register_driver becomes a void function if
!CONFIG_PCI. This will get rid of ugly macros inside the code. And Cc akpm.
--
Jiri Slaby (jirislaby@gmail.com)
Faculty of Informatics, Masaryk University
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-07-22 20:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-22 18:23 [PATCH] Fix drivers/char/cyclades.c warning with CONFIG_PCI=n Gabriel C
2007-07-22 20:13 ` Jiri Slaby
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox