diff options
author | Patrick McHardy <kaber@trash.net> | 2009-07-05 22:23:38 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-07-05 22:23:38 -0400 |
commit | ec634fe328182a1a098585bfc7b69e5042bdb08d (patch) | |
tree | 02883aaee743af10d78d6d8fe9181944b4dd4529 /drivers/net/wan | |
parent | a73e76e23c20c05cb8c0b7ba8bc9daa04b05c80f (diff) |
net: convert remaining non-symbolic return values in ndo_start_xmit() functions
This patch converts the remaining occurences of raw return values to their
symbolic counterparts in ndo_start_xmit() functions that were missed by the
previous automatic conversion.
Additionally code that assumed the symbolic value of NETDEV_TX_OK to be zero
is changed to explicitly use NETDEV_TX_OK.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wan')
-rw-r--r-- | drivers/net/wan/dlci.c | 4 | ||||
-rw-r--r-- | drivers/net/wan/dscc4.c | 2 | ||||
-rw-r--r-- | drivers/net/wan/farsync.c | 8 | ||||
-rw-r--r-- | drivers/net/wan/lmc/lmc_main.c | 2 | ||||
-rw-r--r-- | drivers/net/wan/wanxl.c | 2 |
5 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/wan/dlci.c b/drivers/net/wan/dlci.c index 2fa275a58f9d..8526b6d1ee4d 100644 --- a/drivers/net/wan/dlci.c +++ b/drivers/net/wan/dlci.c | |||
@@ -194,7 +194,7 @@ static int dlci_transmit(struct sk_buff *skb, struct net_device *dev) | |||
194 | ret = 0; | 194 | ret = 0; |
195 | 195 | ||
196 | if (!skb || !dev) | 196 | if (!skb || !dev) |
197 | return(0); | 197 | return NETDEV_TX_OK; |
198 | 198 | ||
199 | dlp = netdev_priv(dev); | 199 | dlp = netdev_priv(dev); |
200 | 200 | ||
@@ -219,7 +219,7 @@ static int dlci_transmit(struct sk_buff *skb, struct net_device *dev) | |||
219 | /* Alan Cox recommends always returning 0, and always freeing the packet */ | 219 | /* Alan Cox recommends always returning 0, and always freeing the packet */ |
220 | /* experience suggest a slightly more conservative approach */ | 220 | /* experience suggest a slightly more conservative approach */ |
221 | 221 | ||
222 | if (!ret) | 222 | if (ret == NETDEV_TX_OK) |
223 | { | 223 | { |
224 | dev_kfree_skb(skb); | 224 | dev_kfree_skb(skb); |
225 | netif_wake_queue(dev); | 225 | netif_wake_queue(dev); |
diff --git a/drivers/net/wan/dscc4.c b/drivers/net/wan/dscc4.c index 8face5db8f32..e81946d98543 100644 --- a/drivers/net/wan/dscc4.c +++ b/drivers/net/wan/dscc4.c | |||
@@ -1182,7 +1182,7 @@ static int dscc4_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1182 | if (dscc4_tx_quiescent(dpriv, dev)) | 1182 | if (dscc4_tx_quiescent(dpriv, dev)) |
1183 | dscc4_do_tx(dpriv, dev); | 1183 | dscc4_do_tx(dpriv, dev); |
1184 | 1184 | ||
1185 | return 0; | 1185 | return NETDEV_TX_OK; |
1186 | } | 1186 | } |
1187 | 1187 | ||
1188 | static int dscc4_close(struct net_device *dev) | 1188 | static int dscc4_close(struct net_device *dev) |
diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c index 90c0a317d9d3..20a1237a3d74 100644 --- a/drivers/net/wan/farsync.c +++ b/drivers/net/wan/farsync.c | |||
@@ -2294,7 +2294,7 @@ fst_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
2294 | dbg(DBG_ASS, | 2294 | dbg(DBG_ASS, |
2295 | "Tried to transmit but no carrier on card %d port %d\n", | 2295 | "Tried to transmit but no carrier on card %d port %d\n", |
2296 | card->card_no, port->index); | 2296 | card->card_no, port->index); |
2297 | return 0; | 2297 | return NETDEV_TX_OK; |
2298 | } | 2298 | } |
2299 | 2299 | ||
2300 | /* Drop it if it's too big! MTU failure ? */ | 2300 | /* Drop it if it's too big! MTU failure ? */ |
@@ -2303,7 +2303,7 @@ fst_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
2303 | LEN_TX_BUFFER); | 2303 | LEN_TX_BUFFER); |
2304 | dev_kfree_skb(skb); | 2304 | dev_kfree_skb(skb); |
2305 | dev->stats.tx_errors++; | 2305 | dev->stats.tx_errors++; |
2306 | return 0; | 2306 | return NETDEV_TX_OK; |
2307 | } | 2307 | } |
2308 | 2308 | ||
2309 | /* | 2309 | /* |
@@ -2337,7 +2337,7 @@ fst_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
2337 | dev->stats.tx_errors++; | 2337 | dev->stats.tx_errors++; |
2338 | dbg(DBG_ASS, "Tx queue overflow card %d port %d\n", | 2338 | dbg(DBG_ASS, "Tx queue overflow card %d port %d\n", |
2339 | card->card_no, port->index); | 2339 | card->card_no, port->index); |
2340 | return 0; | 2340 | return NETDEV_TX_OK; |
2341 | } | 2341 | } |
2342 | 2342 | ||
2343 | /* | 2343 | /* |
@@ -2354,7 +2354,7 @@ fst_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
2354 | fst_q_work_item(&fst_work_txq, card->card_no); | 2354 | fst_q_work_item(&fst_work_txq, card->card_no); |
2355 | tasklet_schedule(&fst_tx_task); | 2355 | tasklet_schedule(&fst_tx_task); |
2356 | 2356 | ||
2357 | return 0; | 2357 | return NETDEV_TX_OK; |
2358 | } | 2358 | } |
2359 | 2359 | ||
2360 | /* | 2360 | /* |
diff --git a/drivers/net/wan/lmc/lmc_main.c b/drivers/net/wan/lmc/lmc_main.c index 45b1822c962d..d1492ae5d30a 100644 --- a/drivers/net/wan/lmc/lmc_main.c +++ b/drivers/net/wan/lmc/lmc_main.c | |||
@@ -1428,7 +1428,7 @@ static int lmc_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1428 | lmc_softc_t *sc = dev_to_sc(dev); | 1428 | lmc_softc_t *sc = dev_to_sc(dev); |
1429 | u32 flag; | 1429 | u32 flag; |
1430 | int entry; | 1430 | int entry; |
1431 | int ret = 0; | 1431 | int ret = NETDEV_TX_OK; |
1432 | unsigned long flags; | 1432 | unsigned long flags; |
1433 | 1433 | ||
1434 | lmc_trace(dev, "lmc_start_xmit in"); | 1434 | lmc_trace(dev, "lmc_start_xmit in"); |
diff --git a/drivers/net/wan/wanxl.c b/drivers/net/wan/wanxl.c index e4ad7b6b52eb..03b76adbe5f0 100644 --- a/drivers/net/wan/wanxl.c +++ b/drivers/net/wan/wanxl.c | |||
@@ -310,7 +310,7 @@ static int wanxl_xmit(struct sk_buff *skb, struct net_device *dev) | |||
310 | } | 310 | } |
311 | 311 | ||
312 | spin_unlock(&port->lock); | 312 | spin_unlock(&port->lock); |
313 | return 0; | 313 | return NETDEV_TX_OK; |
314 | } | 314 | } |
315 | 315 | ||
316 | 316 | ||