lkml.org 
[lkml]   [2001]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] net #6
Date

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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 12:54    [W:0.048 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site