From: Rasmus Andersen <rasmus@jaquet.dk>
To: support@moxa.com.tw
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] remove warnings from drivers/char/moxa.c
Date: Fri, 8 Dec 2000 21:34:56 +0100 [thread overview]
Message-ID: <20001208213456.F599@jaquet.dk> (raw)
Hi.
The following patch makes some 'defined but not used' warnings go away
when compiling drivers/char/moxa.c without CONFIG_PCI (240t12p3). It should
apply cleanly.
--- linux-240-t12-pre3-clean/drivers/char/moxa.c Wed May 3 10:45:18 2000
+++ linux/drivers/char/moxa.c Wed Nov 29 18:35:01 2000
@@ -111,12 +111,14 @@
unsigned short board_type;
} moxa_pciinfo;
+#ifdef CONFIG_PCI
static moxa_pciinfo moxa_pcibrds[] =
{
{PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_C218, MOXA_BOARD_C218_PCI},
{PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_C320, MOXA_BOARD_C320_PCI},
{PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_CP204J, MOXA_BOARD_CP204J},
};
+#endif
typedef struct _moxa_isa_board_conf {
int boardType;
@@ -236,7 +238,10 @@
/*
* static functions:
*/
+#ifdef CONFIG_PCI
static int moxa_get_PCI_conf(struct pci_dev *, int, moxa_board_conf *);
+#endif
+
static void do_moxa_softint(void *);
static int moxa_open(struct tty_struct *, struct file *);
static void moxa_close(struct tty_struct *, struct file *);
@@ -333,7 +338,7 @@
int moxa_init(void)
{
- int i, n, numBoards;
+ int i, numBoards;
struct moxa_str *ch;
int ret1, ret2;
@@ -484,6 +489,8 @@
#ifdef CONFIG_PCI
{
struct pci_dev *p = NULL;
+ int n;
+
n = sizeof(moxa_pcibrds) / sizeof(moxa_pciinfo);
i = 0;
while (i < n) {
@@ -511,6 +518,7 @@
return (0);
}
+#ifdef CONFIG_PCI
static int moxa_get_PCI_conf(struct pci_dev *p, int board_type, moxa_board_conf * board)
{
board->baseAddr = pci_resource_start (p, 2);
@@ -534,6 +542,7 @@
return (0);
}
+#endif
static void do_moxa_softint(void *private_)
{
--
Regards,
Rasmus(rasmus@jaquet.dk)
Genius may have its limitations, but stupidity is not thus handicapped.
-- Elbert Hubbard
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
reply other threads:[~2000-12-08 21:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20001208213456.F599@jaquet.dk \
--to=rasmus@jaquet.dk \
--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;
as well as URLs for NNTP newsgroup(s).