mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] compiler warning fixes in 8139too.c
@ 2001-05-29 19:06 Anuradha Ratnaweera
  2001-05-30  6:14 ` Andreas Dilger
  0 siblings, 1 reply; 2+ messages in thread
From: Anuradha Ratnaweera @ 2001-05-29 19:06 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Alan Cox, Linux Kernel


The following patch fixes some warnings when 8139 driver is compiled
without 8129 support.

Regards,

Anuradha

----------------------------------
http://www.bee.lk/people/anuradha/


diff -rua linux-2.4.5/drivers/net/8139too.c linux/drivers/net/8139too.c
--- linux-2.4.5/drivers/net/8139too.c	Tue May 29 23:41:48 2001
+++ linux/drivers/net/8139too.c	Wed May 30 01:00:21 2001
@@ -1150,6 +1150,7 @@
 	0
 };
 
+#ifdef CONFIG_8139TOO_8129
 
 /* Syncronize the MII management interface by shifting 32 one bits out. */
 static void mdio_sync (void *mdio_addr)
@@ -1168,14 +1169,18 @@
 	DPRINTK ("EXIT\n");
 }
 
+#endif
 
 static int mdio_read (struct net_device *dev, int phy_id, int location)
 {
 	struct rtl8139_private *tp = dev->priv;
+	int retval = 0;
+
+#ifdef CONFIG_8139TOO_8129
 	void *mdio_addr = tp->mmio_addr + Config4;
 	int mii_cmd = (0xf6 << 10) | (phy_id << 5) | location;
-	int retval = 0;
 	int i;
+#endif
 
 	DPRINTK ("ENTER\n");
 
@@ -1216,9 +1221,12 @@
 			int value)
 {
 	struct rtl8139_private *tp = dev->priv;
+
+#ifdef CONFIG_8139TOO_8129
 	void *mdio_addr = tp->mmio_addr + Config4;
 	int mii_cmd = (0x5002 << 16) | (phy_id << 23) | (location << 18) | value;
 	int i;
+#endif
 
 	DPRINTK ("ENTER\n");
 


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

end of thread, other threads:[~2001-05-30  6:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-29 19:06 [PATCH] compiler warning fixes in 8139too.c Anuradha Ratnaweera
2001-05-30  6:14 ` Andreas Dilger

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

all inboxes | Powered by JetHome®