Skip to contentSkip to conversation

pcnet32: remove compile warnings in non-napi mode

PATCH Applied Don Fry 2 participants 2 messages Oct 17, 2007 – Oct 18, 2007

Subsystems (2)
lore
Share & tools
lore

Don Fry

author
#0 lore raw

PATCH 1/1 pcnet32: remove compile warnings in non-napi mode

Remove compile warning when in non-napi mode.

---

drivers/net/pcnet32.c renamed from drivers/net/napi.pcnet32.c +4 -0
@@ -442,7 +442,9 @@ static struct pcnet32_access pcnet32_dwi
 
 static void pcnet32_netif_stop(struct net_device *dev)
 {
+#ifdef CONFIG_PCNET32_NAPI
 	struct pcnet32_private *lp = netdev_priv(dev);
+#endif
 	dev->trans_start = jiffies;
 #ifdef CONFIG_PCNET32_NAPI
 	napi_disable(&lp->napi);
@@ -452,7 +454,9 @@ static void pcnet32_netif_stop(struct ne
 
 static void pcnet32_netif_start(struct net_device *dev)
 {
+#ifdef CONFIG_PCNET32_NAPI
 	struct pcnet32_private *lp = netdev_priv(dev);
+#endif
 	netif_wake_queue(dev);
 #ifdef CONFIG_PCNET32_NAPI
 	napi_enable(&lp->napi);
Applied
#1 lore raw
Quoted 7 lines · Don Fry

Remove compile warning when in non-napi mode.

---

drivers/net/pcnet32.c static struct pcnet32_access pcnet32_dwi · line 450

Quoted 9 lines
drivers/net/pcnet32.c renamed from drivers/net/napi.pcnet32.c +2 -0
@@ -442,7 +442,9 @@ static struct pcnet32_access pcnet32_dwi
 
 static void pcnet32_netif_stop(struct net_device *dev)
 {
+#ifdef CONFIG_PCNET32_NAPI
 	struct pcnet32_private *lp = netdev_priv(dev);
+#endif
 	dev->trans_start = jiffies;
 #ifdef CONFIG_PCNET32_NAPI
 	napi_disable(&lp->napi);

applied