public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@gmail.com>
To: Gabriel C <nix.or.die@googlemail.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Fix drivers/char/cyclades.c warning with CONFIG_PCI=n
Date: Sun, 22 Jul 2007 22:13:49 +0200	[thread overview]
Message-ID: <46A3BA7D.3030000@gmail.com> (raw)
In-Reply-To: <46A3A0A9.3020100@googlemail.com>

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

      reply	other threads:[~2007-07-22 20:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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=46A3BA7D.3030000@gmail.com \
    --to=jirislaby@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nix.or.die@googlemail.com \
    /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