* [PATCH] Moxa: Fix tiny compiler warning when building withoug CONFIG_PCI
@ 2007-08-16 22:08 Jesper Juhl
2007-09-12 3:20 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: Jesper Juhl @ 2007-08-16 22:08 UTC (permalink / raw)
To: Jiri Slaby; +Cc: support, Alan Cox, linux-kernel, Jesper Juhl
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 *);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Moxa: Fix tiny compiler warning when building withoug CONFIG_PCI
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
2007-09-12 8:22 ` Jiri Slaby
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2007-09-12 3:20 UTC (permalink / raw)
To: Jesper Juhl; +Cc: Jiri Slaby, support, Alan Cox, linux-kernel
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 *);
_
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Moxa: Fix tiny compiler warning when building withoug CONFIG_PCI
2007-09-12 3:20 ` Andrew Morton
@ 2007-09-12 8:22 ` Jiri Slaby
0 siblings, 0 replies; 3+ messages in thread
From: Jiri Slaby @ 2007-09-12 8:22 UTC (permalink / raw)
To: Andrew Morton; +Cc: Jesper Juhl, support, Alan Cox, linux-kernel
Andrew Morton napsal(a):
> 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 *);
Acked-by: Jiri Slaby <jirislaby@gmail.com>
thanks,
--
http://www.fi.muni.cz/~xslaby/ Jiri Slaby
faculty of informatics, masaryk university, brno, cz
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-09-12 8:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2007-09-12 8:22 ` Jiri Slaby
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox