public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rasmus Andersen <rasmus@jaquet.dk>
To: Peter Samuelson <peter@cadcamlab.org>
Cc: Pavel Machek <pavel@suse.cz>,
	perex@suse.cz, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] remove warning from drivers/net/hp100.c (240-test12-pre7)
Date: Mon, 11 Dec 2000 21:32:08 +0100	[thread overview]
Message-ID: <20001211213208.B600@jaquet.dk> (raw)
In-Reply-To: <20001208211908.D599@jaquet.dk> <20001209101924.A126@bug.ucw.cz> <20001209163740.U6567@cadcamlab.org>
In-Reply-To: <20001209163740.U6567@cadcamlab.org>; from peter@cadcamlab.org on Sat, Dec 09, 2000 at 04:37:40PM -0600

On Sat, Dec 09, 2000 at 04:37:40PM -0600, Peter Samuelson wrote:
> 
> [Pavel Machek]
> > I'd say that warning is more acceptable than #ifdef... In cases where
> > warnings can be eliminating without ifdefs, that's okay, but this...
> 
> In this case it is dead weight in the object file -- and for machines
> that can least afford it (CONFIG_PCI=n is mostly for the low end,
> right?).

How about this patch? It moves the offending struct to the __init function
where it is used and inside an existing #ifdef CONFIG_PCI. This would be
up to the maintainer but since this is the only place the struct is used
I think it is acceptable to move it from the top of the file.

Comments?


--- linux-240-t12-pre8-clean/drivers/net/hp100.c	Sat Nov  4 23:27:07 2000
+++ linux/drivers/net/hp100.c	Mon Dec 11 21:23:12 2000
@@ -265,13 +265,6 @@
 
 #define HP100_EISA_IDS_SIZE	(sizeof(hp100_eisa_ids)/sizeof(struct hp100_eisa_id))
 
-static struct hp100_pci_id hp100_pci_ids[] = {
-  { PCI_VENDOR_ID_HP, 		PCI_DEVICE_ID_HP_J2585A },
-  { PCI_VENDOR_ID_HP,		PCI_DEVICE_ID_HP_J2585B },
-  { PCI_VENDOR_ID_COMPEX,	PCI_DEVICE_ID_COMPEX_ENET100VG4 },
-  { PCI_VENDOR_ID_COMPEX2,	PCI_DEVICE_ID_COMPEX2_100VG }
-};
-
 #define HP100_PCI_IDS_SIZE	(sizeof(hp100_pci_ids)/sizeof(struct hp100_pci_id))
 
 static int hp100_rx_ratio = HP100_DEFAULT_RX_RATIO;
@@ -335,6 +328,13 @@
   int ioaddr = 0;
 #ifdef CONFIG_PCI
   int pci_start_index = 0;
+
+  static struct hp100_pci_id hp100_pci_ids[] = {
+	  { PCI_VENDOR_ID_HP, 		PCI_DEVICE_ID_HP_J2585A },
+	  { PCI_VENDOR_ID_HP,		PCI_DEVICE_ID_HP_J2585B },
+	  { PCI_VENDOR_ID_COMPEX,	PCI_DEVICE_ID_COMPEX_ENET100VG4 },
+	  { PCI_VENDOR_ID_COMPEX2,	PCI_DEVICE_ID_COMPEX2_100VG }
+  };
 #endif
 
 #ifdef HP100_DEBUG_B

-- 
Regards,
        Rasmus(rasmus@jaquet.dk)

It's a recession when your neighbour loses his job; it's a depression 
when you lose yours. -- Harry S. Truman 
-
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-11 20:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-08 20:19 [PATCH] remove warning from drivers/net/hp100.c (240-test12-pre7) Rasmus Andersen
2000-12-09  9:19 ` Pavel Machek
2000-12-09 22:37   ` Peter Samuelson
2000-12-11 20:32     ` Rasmus Andersen [this message]
2000-12-12  0:09       ` Peter Samuelson
2000-12-12 13:49         ` Rasmus Andersen

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=20001211213208.B600@jaquet.dk \
    --to=rasmus@jaquet.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@suse.cz \
    --cc=perex@suse.cz \
    --cc=peter@cadcamlab.org \
    /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