public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Jesper Juhl <jesper.juhl@gmail.com>
Cc: Jiri Slaby <jirislaby@gmail.com>,
	support@moxa.com.tw, Alan Cox <alan@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Moxa: Fix tiny compiler warning when building withoug CONFIG_PCI
Date: Tue, 11 Sep 2007 20:20:54 -0700	[thread overview]
Message-ID: <20070911202054.dad2ac0c.akpm@linux-foundation.org> (raw)
In-Reply-To: <200708170008.58649.jesper.juhl@gmail.com>

On Fri, 17 Aug 2007 00:08:58 +0200 Jesper Juhl <jesper.juhl@gmail.com> wrote:

> 
> Fix this tiny compiler warning in Moxa driver : 
>   drivers/char/mxser.c:386: warning: 'mxser_get_PCI_conf' declared 'static' but never defined
> when building without CONFIG_PCI.
> 
> 
> Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
> ---
> 
>  drivers/char/mxser.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c
> index 2aee3fe..83b15b5 100644
> --- a/drivers/char/mxser.c
> +++ b/drivers/char/mxser.c
> @@ -383,7 +383,9 @@ static int mxser_init(void);
>  
>  /* static void   mxser_poll(unsigned long); */
>  static int mxser_get_ISA_conf(int, struct mxser_hwconf *);
> +#ifdef CONFIG_PCI
>  static int mxser_get_PCI_conf(int, int, int, struct mxser_hwconf *);
> +#endif
>  static void mxser_do_softint(struct work_struct *);
>  static int mxser_open(struct tty_struct *, struct file *);
>  static void mxser_close(struct tty_struct *, struct file *);
> 

mxser_get_PCI_conf() is defined before it is used anwyay.  So that
prototype is a stupid waste of space and just adds problems.

--- a/drivers/char/mxser.c~mxser-fix-compiler-warning-when-building-withoug-config_pci
+++ a/drivers/char/mxser.c
@@ -383,7 +383,6 @@ static int mxser_init(void);
 
 /* static void   mxser_poll(unsigned long); */
 static int mxser_get_ISA_conf(int, struct mxser_hwconf *);
-static int mxser_get_PCI_conf(int, int, int, struct mxser_hwconf *);
 static void mxser_do_softint(struct work_struct *);
 static int mxser_open(struct tty_struct *, struct file *);
 static void mxser_close(struct tty_struct *, struct file *);
_


  reply	other threads:[~2007-09-12  3:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-16 22:08 [PATCH] Moxa: Fix tiny compiler warning when building withoug CONFIG_PCI Jesper Juhl
2007-09-12  3:20 ` Andrew Morton [this message]
2007-09-12  8:22   ` Jiri Slaby

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=20070911202054.dad2ac0c.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=alan@redhat.com \
    --cc=jesper.juhl@gmail.com \
    --cc=jirislaby@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=support@moxa.com.tw \
    /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