Skip to contentSkip to conversation

Moxa: Fix tiny compiler warning when building withoug CONFIG_PCI

PATCH In review Jesper Juhl 3 participants 3 messages Aug 16, 2007 – Sep 12, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Moxa: Fix tiny compiler warning when building withoug CONFIG_PCI

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.

---

 drivers/char/mxser.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/char/mxser.c +2 -0
index 2aee3fe..83b15b5 100644
@@ -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 *);
#1 lore raw
Quoted 18 lines · On Fri, 17 Aug 2007 00:08:58 +0200 Jesper Juhl <[email protected]> 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.

---

 drivers/char/mxser.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/char/mxser.c +0 -0
index 2aee3fe..83b15b5 100644

drivers/char/mxser.c static int mxser_init(void); · line 391

Quoted 9 lines
drivers/char/mxser.c +2 -0
@@ -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.

drivers/char/mxser.c renamed from drivers/char/mxser.c~mxser-fix-compiler-warning-when-building-withoug-config_pci +0 -1
@@ -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
#2 lore raw

Andrew Morton napsal(a):

Quoted 35 lines · On Fri, 17 Aug 2007 00:08:58 +0200 Jesper Juhl <[email protected]> wrote:
Quoted 18 lines

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.

---

 drivers/char/mxser.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/char/mxser.c +0 -0
index 2aee3fe..83b15b5 100644

drivers/char/mxser.c static int mxser_init(void); · line 391

Quoted 9 lines
drivers/char/mxser.c +2 -0
@@ -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.

drivers/char/mxser.c static int mxser_init(void); · line 388

Quoted 7 lines
drivers/char/mxser.c renamed from drivers/char/mxser.c~mxser-fix-compiler-warning-when-building-withoug-config_pci +0 -1
@@ -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 *);

thanks,

Signature · 2 lines
http://www.fi.muni.cz/~xslaby/            Jiri Slaby
faculty of informatics, masaryk university, brno, cz