public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net #6
@ 2001-05-30  0:44 Andrzej Krzysztofowicz
  2001-05-30  8:01 ` Alan Cox
  0 siblings, 1 reply; 5+ messages in thread
From: Andrzej Krzysztofowicz @ 2001-05-30  0:44 UTC (permalink / raw)
  To: Alan Cox, Jeff Garzik, Philip.Blundell; +Cc: kernel list


The following patch removes unnecessary #ifdefs from eexpress.c

Andrzej

************************** PATCH 6 *******************************
diff -uNr linux-2.4.5-ac4/drivers/net/eexpress.c linux/drivers/net/eexpress.c
--- linux-2.4.5-ac4/drivers/net/eexpress.c	Wed May 30 01:08:54 2001
+++ linux/drivers/net/eexpress.c	Wed May 30 01:13:49 2001
@@ -574,9 +574,7 @@
 static void eexp_timeout(struct net_device *dev)
 {
 	struct net_local *lp = (struct net_local *)dev->priv;
-#ifdef CONFIG_SMP
-	unsigned long flags;
-#endif
+	unsigned long __attribute__((unused)) flags;
 	int status;
 	
 	disable_irq(dev->irq);
@@ -586,10 +584,7 @@
 	 *	lets make it work first..
 	 */
 	 
-#ifdef CONFIG_SMP
 	spin_lock_irqsave(&lp->lock, flags);
-#endif
-
 	status = scb_status(dev);
 	unstick_cu(dev);
 	printk(KERN_INFO "%s: transmit timed out, %s?\n", dev->name,
@@ -602,9 +597,7 @@
 		outb(0,dev->base_addr+SIGNAL_CA);
 	}
 	netif_wake_queue(dev);	
-#ifdef CONFIG_SMP
 	spin_unlock_irqrestore(&lp->lock, flags);
-#endif
 }
 
 /*
@@ -614,9 +607,7 @@
 static int eexp_xmit(struct sk_buff *buf, struct net_device *dev)
 {
 	struct net_local *lp = (struct net_local *)dev->priv;
-#ifdef CONFIG_SMP
-	unsigned long flags;
-#endif
+	unsigned long __attribute__((unused)) flags;
 
 #if NET_DEBUG > 6
 	printk(KERN_DEBUG "%s: eexp_xmit()\n", dev->name);
@@ -629,10 +620,7 @@
 	 *	lets make it work first..
 	 */
 	 
-#ifdef CONFIG_SMP
 	spin_lock_irqsave(&lp->lock, flags);
-#endif
-  
 	{
 		unsigned short length = (ETH_ZLEN < buf->len) ? buf->len :
 			ETH_ZLEN;
@@ -643,9 +631,7 @@
 	        eexp_hw_tx_pio(dev,data,length);
 	}
 	dev_kfree_skb(buf);
-#ifdef CONFIG_SMP
 	spin_unlock_irqrestore(&lp->lock, flags);
-#endif
 	enable_irq(dev->irq);
 	return 0;
 }


-- 
=======================================================================
  Andrzej M. Krzysztofowicz               ankry@mif.pg.gda.pl
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Technical University of Gdansk

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

end of thread, other threads:[~2001-05-31 21:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-05-30  0:44 [PATCH] net #6 Andrzej Krzysztofowicz
2001-05-30  8:01 ` Alan Cox
2001-05-30 10:35   ` Andrzej Krzysztofowicz
2001-05-30 22:24   ` Pavel Machek
2001-05-31 21:35     ` Alan Cox

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