public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2.6] Natsemi - remove compilation warnings
@ 2004-09-23  7:58 Michal Rokos
  2004-09-23 14:18 ` Michal Rokos
  0 siblings, 1 reply; 12+ messages in thread
From: Michal Rokos @ 2004-09-23  7:58 UTC (permalink / raw)
  To: thockin; +Cc: linux-kernel

Hi Tim,

natsemi driver emits a lot of warnings.

This patch make compilation calm again.

Code taken from drivers/net/pci-skeleton.c. Thanks Jeff.

Michal

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/09/23 09:43:08+02:00 michal@nb-rokos.nx.cz
#   [PATCH 2.6] Natsemi - remove compilation warnings
#
# drivers/net/natsemi.c
#   2004/09/23 09:42:50+02:00 michal@nb-rokos.nx.cz +13 -0
#   Remove zillion of
#   drivers/net/natsemi.c:806: warning: passing arg 2 of `writew' makes 
pointer from integer without a cast
#   drivers/net/natsemi.c:807: warning: passing arg 1 of `readw' makes 
pointer from integer without a cast
#
diff -Nru a/drivers/net/natsemi.c b/drivers/net/natsemi.c
--- a/drivers/net/natsemi.c     2004-09-23 09:44:14 +02:00
+++ b/drivers/net/natsemi.c     2004-09-23 09:44:14 +02:00
@@ -769,6 +769,19 @@
 static int netdev_get_regs(struct net_device *dev, u8 *buf);
 static int netdev_get_eeprom(struct net_device *dev, u8 *buf);

+#undef readb
+#undef readw
+#undef readl
+#undef writeb
+#undef writew
+#undef writel
+#define readb(addr) inb((unsigned long)(addr))
+#define readw(addr) inw((unsigned long)(addr))
+#define readl(addr) inl((unsigned long)(addr))
+#define writeb(val,addr) outb((val), (unsigned long)(addr))
+#define writew(val,addr) outw((val), (unsigned long)(addr))
+#define writel(val,addr) outl((val), (unsigned long)(addr))
+
 static void move_int_phy(struct net_device *dev, int addr)
 {
        struct netdev_private *np = netdev_priv(dev);


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2004-09-30 20:11 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-23  7:58 [PATCH 2.6] Natsemi - remove compilation warnings Michal Rokos
2004-09-23 14:18 ` Michal Rokos
2004-09-30 16:44   ` Franz Pletz
2004-09-30 17:24     ` Linus Torvalds
2004-09-30 18:09       ` Andrey S. Klochko
2004-09-30 18:22         ` Linus Torvalds
2004-09-30 18:16       ` Franz Pletz
2004-09-30 18:21       ` Jeff Garzik
2004-09-30 18:33         ` Linus Torvalds
2004-09-30 18:40         ` Tim Hockin
2004-09-30 19:53         ` David S. Miller
2004-09-30 20:08           ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox