Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5b548140 authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller
Browse files

net: use symbolic values for ndo_start_xmit() return codes



Convert magic values 1 and -1 to NETDEV_TX_BUSY and NETDEV_TX_LOCKED respectively.

0 (NETDEV_TX_OK) is not changed to keep the noise down, except in very few cases
where its in direct proximity to one of the other values.

Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5b2c4b97
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1069,7 +1069,7 @@ isdn_net_xmit(struct net_device *ndev, struct sk_buff *skb)
	lp = isdn_net_get_locked_lp(nd);
	if (!lp) {
		printk(KERN_WARNING "%s: all channels busy - requeuing!\n", ndev->name);
		return 1;
		return NETDEV_TX_BUSY;
	}
	/* we have our lp locked from now on */

@@ -1273,14 +1273,14 @@ isdn_net_start_xmit(struct sk_buff *skb, struct net_device *ndev)
					spin_unlock_irqrestore(&dev->lock, flags);
					isdn_net_dial();	/* Initiate dialing */
					netif_stop_queue(ndev);
					return 1;	/* let upper layer requeue skb packet */
					return NETDEV_TX_BUSY;	/* let upper layer requeue skb packet */
				}
#endif
				/* Initiate dialing */
				spin_unlock_irqrestore(&dev->lock, flags);
				isdn_net_dial();
				isdn_net_device_stop_queue(lp);
				return 1;
				return NETDEV_TX_BUSY;
			} else {
				isdn_net_unreachable(ndev, skb,
						     "No phone number");
+2 −2
Original line number Diff line number Diff line
@@ -703,7 +703,7 @@ mpt_lan_sdu_send (struct sk_buff *skb, struct net_device *dev)

		printk (KERN_ERR "%s: no tx context available: %u\n",
			__func__, priv->mpt_txfidx_tail);
		return 1;
		return NETDEV_TX_BUSY;
	}

	mf = mpt_get_msg_frame(LanCtx, mpt_dev);
@@ -713,7 +713,7 @@ mpt_lan_sdu_send (struct sk_buff *skb, struct net_device *dev)

		printk (KERN_ERR "%s: Unable to alloc request frame\n",
			__func__);
		return 1;
		return NETDEV_TX_BUSY;
	}

	ctx = priv->mpt_txfidx[priv->mpt_txfidx_tail--];
+1 −1
Original line number Diff line number Diff line
@@ -1088,7 +1088,7 @@ static int elp_start_xmit(struct sk_buff *skb, struct net_device *dev)
			pr_debug("%s: failed to transmit packet\n", dev->name);
		}
		spin_unlock_irqrestore(&adapter->lock, flags);
		return 1;
		return NETDEV_TX_BUSY;
	}
	if (elp_debug >= 3)
		pr_debug("%s: packet of length %d sent\n", dev->name, (int) skb->len);
+1 −1
Original line number Diff line number Diff line
@@ -1014,7 +1014,7 @@ static int corkscrew_start_xmit(struct sk_buff *skb,
		int i;

		if (vp->tx_full)	/* No room to transmit with */
			return 1;
			return NETDEV_TX_BUSY;
		if (vp->cur_tx != 0)
			prev_entry = &vp->tx_ring[(vp->cur_tx - 1) % TX_RING_SIZE];
		else
+1 −1
Original line number Diff line number Diff line
@@ -1030,7 +1030,7 @@ static int mc32_send_packet(struct sk_buff *skb, struct net_device *dev)
	netif_stop_queue(dev);

	if(atomic_read(&lp->tx_count)==0) {
		return 1;
		return NETDEV_TX_BUSY;
	}

	if (skb_padto(skb, ETH_ZLEN)) {
Loading