Skip to content

Commit

Permalink
net: use NETDEV_TX_OK instead of 0 in ndo_start_xmit() functions
Browse files Browse the repository at this point in the history
This patch is the result of an automatic spatch transformation to convert
all ndo_start_xmit() return values of 0 to NETDEV_TX_OK.

Some occurences are missed by the automatic conversion, those will be
handled in a seperate patch.

Signed-off-by: Patrick McHardy <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
kaber authored and davem330 committed Jul 6, 2009
1 parent 0e8635a commit 6ed1065
Show file tree
Hide file tree
Showing 190 changed files with 330 additions and 330 deletions.
2 changes: 1 addition & 1 deletion arch/ia64/hp/sim/simeth.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ simeth_tx(struct sk_buff *skb, struct net_device *dev)
*/

dev_kfree_skb(skb);
return 0;
return NETDEV_TX_OK;
}

static inline struct sk_buff *
Expand Down
2 changes: 1 addition & 1 deletion arch/um/drivers/net_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ static int uml_net_start_xmit(struct sk_buff *skb, struct net_device *dev)

dev_kfree_skb(skb);

return 0;
return NETDEV_TX_OK;
}

static void uml_net_set_multicast_list(struct net_device *dev)
Expand Down
2 changes: 1 addition & 1 deletion drivers/ieee802154/fakehard.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ static int ieee802154_fake_xmit(struct sk_buff *skb, struct net_device *dev)

/* FIXME: do hardware work here ... */

return 0;
return NETDEV_TX_OK;
}


Expand Down
12 changes: 6 additions & 6 deletions drivers/isdn/i4l/isdn_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -1202,7 +1202,7 @@ isdn_net_start_xmit(struct sk_buff *skb, struct net_device *ndev)
if (!(ISDN_NET_DIALMODE(*lp) == ISDN_NET_DM_AUTO)) {
isdn_net_unreachable(ndev, skb, "dial rejected: interface not in dialmode `auto'");
dev_kfree_skb(skb);
return 0;
return NETDEV_TX_OK;
}
if (lp->phone[1]) {
ulong flags;
Expand All @@ -1215,7 +1215,7 @@ isdn_net_start_xmit(struct sk_buff *skb, struct net_device *ndev)
if(time_before(jiffies, lp->dialwait_timer)) {
isdn_net_unreachable(ndev, skb, "dial rejected: retry-time not reached");
dev_kfree_skb(skb);
return 0;
return NETDEV_TX_OK;
} else
lp->dialwait_timer = 0;
}
Expand Down Expand Up @@ -1243,7 +1243,7 @@ isdn_net_start_xmit(struct sk_buff *skb, struct net_device *ndev)
isdn_net_unreachable(ndev, skb,
"No channel");
dev_kfree_skb(skb);
return 0;
return NETDEV_TX_OK;
}
/* Log packet, which triggered dialing */
if (dev->net_verbose)
Expand All @@ -1258,7 +1258,7 @@ isdn_net_start_xmit(struct sk_buff *skb, struct net_device *ndev)
dev_kfree_skb(skb);
isdn_net_unbind_channel(lp);
spin_unlock_irqrestore(&dev->lock, flags);
return 0; /* STN (skb to nirvana) ;) */
return NETDEV_TX_OK; /* STN (skb to nirvana) ;) */
}
#ifdef CONFIG_IPPP_FILTER
if (isdn_ppp_autodial_filter(skb, lp)) {
Expand All @@ -1267,7 +1267,7 @@ isdn_net_start_xmit(struct sk_buff *skb, struct net_device *ndev)
spin_unlock_irqrestore(&dev->lock, flags);
isdn_net_unreachable(ndev, skb, "dial rejected: packet filtered");
dev_kfree_skb(skb);
return 0;
return NETDEV_TX_OK;
}
#endif
spin_unlock_irqrestore(&dev->lock, flags);
Expand All @@ -1285,7 +1285,7 @@ isdn_net_start_xmit(struct sk_buff *skb, struct net_device *ndev)
isdn_net_unreachable(ndev, skb,
"No phone number");
dev_kfree_skb(skb);
return 0;
return NETDEV_TX_OK;
}
} else {
/* Device is connected to an ISDN channel */
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/dvb/dvb-core/dvb_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,7 @@ static int dvb_net_sec_callback(const u8 *buffer1, size_t buffer1_len,
static int dvb_net_tx(struct sk_buff *skb, struct net_device *dev)
{
dev_kfree_skb(skb);
return 0;
return NETDEV_TX_OK;
}

static u8 mask_normal[6]={0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
Expand Down
2 changes: 1 addition & 1 deletion drivers/message/fusion/mptlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ mpt_lan_sdu_send (struct sk_buff *skb, struct net_device *dev)
IOC_AND_NETDEV_NAMES_s_s(dev),
le32_to_cpu(pSimple->FlagsLength)));

return 0;
return NETDEV_TX_OK;
}

/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
Expand Down
4 changes: 2 additions & 2 deletions drivers/misc/sgi-xp/xpnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ xpnet_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)

if (skb->data[0] == 0x33) {
dev_kfree_skb(skb);
return 0; /* nothing needed to be done */
return NETDEV_TX_OK; /* nothing needed to be done */
}

/*
Expand Down Expand Up @@ -503,7 +503,7 @@ xpnet_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
dev->stats.tx_packets++;
dev->stats.tx_bytes += skb->len;

return 0;
return NETDEV_TX_OK;
}

/*
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/3c505.c
Original file line number Diff line number Diff line change
Expand Up @@ -1101,7 +1101,7 @@ static int elp_start_xmit(struct sk_buff *skb, struct net_device *dev)
prime_rx(dev);
spin_unlock_irqrestore(&adapter->lock, flags);
netif_start_queue(dev);
return 0;
return NETDEV_TX_OK;
}

/******************************************************
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/3c507.c
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ static int el16_send_packet (struct sk_buff *skb, struct net_device *dev)

/* You might need to clean up and record Tx statistics here. */

return 0;
return NETDEV_TX_OK;
}

/* The typical workload of the driver:
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/3c509.c
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ el3_start_xmit(struct sk_buff *skb, struct net_device *dev)
outb(0x00, ioaddr + TX_STATUS); /* Pop the status stack. */
}
}
return 0;
return NETDEV_TX_OK;
}

/* The EL3 interrupt handler. */
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/3c515.c
Original file line number Diff line number Diff line change
Expand Up @@ -1054,7 +1054,7 @@ static int corkscrew_start_xmit(struct sk_buff *skb,
netif_wake_queue(dev);
}
dev->trans_start = jiffies;
return 0;
return NETDEV_TX_OK;
}
/* Put out the doubleword header... */
outl(skb->len, ioaddr + TX_FIFO);
Expand Down Expand Up @@ -1117,7 +1117,7 @@ static int corkscrew_start_xmit(struct sk_buff *skb,
outb(0x00, ioaddr + TxStatus); /* Pop the status stack. */
}
}
return 0;
return NETDEV_TX_OK;
}

/* The interrupt handler does all of the Rx thread work and cleans up
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/3c523.c
Original file line number Diff line number Diff line change
Expand Up @@ -1198,7 +1198,7 @@ static int elmc_send_packet(struct sk_buff *skb, struct net_device *dev)
netif_wake_queue(dev);
dev_kfree_skb(skb);
#endif
return 0;
return NETDEV_TX_OK;
}

/*******************************************
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/3c527.c
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,7 @@ static int mc32_send_packet(struct sk_buff *skb, struct net_device *dev)

if (skb_padto(skb, ETH_ZLEN)) {
netif_wake_queue(dev);
return 0;
return NETDEV_TX_OK;
}

atomic_dec(&lp->tx_count);
Expand Down Expand Up @@ -1066,7 +1066,7 @@ static int mc32_send_packet(struct sk_buff *skb, struct net_device *dev)
p->control &= ~CONTROL_EOL;

netif_wake_queue(dev);
return 0;
return NETDEV_TX_OK;
}


Expand Down
4 changes: 2 additions & 2 deletions drivers/net/3c59x.c
Original file line number Diff line number Diff line change
Expand Up @@ -2083,7 +2083,7 @@ vortex_start_xmit(struct sk_buff *skb, struct net_device *dev)
iowrite8(0x00, ioaddr + TxStatus); /* Pop the status stack. */
}
}
return 0;
return NETDEV_TX_OK;
}

static int
Expand Down Expand Up @@ -2173,7 +2173,7 @@ boomerang_start_xmit(struct sk_buff *skb, struct net_device *dev)
iowrite16(DownUnstall, ioaddr + EL3_CMD);
spin_unlock_irqrestore(&vp->lock, flags);
dev->trans_start = jiffies;
return 0;
return NETDEV_TX_OK;
}

/* The interrupt handler does all of the Rx thread work and cleans up
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/8139cp.c
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,7 @@ static int cp_start_xmit (struct sk_buff *skb, struct net_device *dev)
cpw8(TxPoll, NormalTxPoll);
dev->trans_start = jiffies;

return 0;
return NETDEV_TX_OK;
}

/* Set or clear the multicast filter for this adaptor.
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/8139too.c
Original file line number Diff line number Diff line change
Expand Up @@ -1706,7 +1706,7 @@ static int rtl8139_start_xmit (struct sk_buff *skb, struct net_device *dev)
} else {
dev_kfree_skb(skb);
dev->stats.tx_dropped++;
return 0;
return NETDEV_TX_OK;
}

spin_lock_irqsave(&tp->lock, flags);
Expand All @@ -1731,7 +1731,7 @@ static int rtl8139_start_xmit (struct sk_buff *skb, struct net_device *dev)
pr_debug("%s: Queued Tx packet size %u to slot %d.\n",
dev->name, len, entry);

return 0;
return NETDEV_TX_OK;
}


Expand Down
4 changes: 2 additions & 2 deletions drivers/net/82596.c
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,7 @@ static int i596_start_xmit(struct sk_buff *skb, struct net_device *dev)

if (skb->len < ETH_ZLEN) {
if (skb_padto(skb, ETH_ZLEN))
return 0;
return NETDEV_TX_OK;
length = ETH_ZLEN;
}
netif_stop_queue(dev);
Expand Down Expand Up @@ -1110,7 +1110,7 @@ static int i596_start_xmit(struct sk_buff *skb, struct net_device *dev)

netif_start_queue(dev);

return 0;
return NETDEV_TX_OK;
}

static void print_eth(unsigned char *add, char *str)
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/amd8111e.c
Original file line number Diff line number Diff line change
Expand Up @@ -1346,7 +1346,7 @@ static int amd8111e_start_xmit(struct sk_buff *skb, struct net_device * dev)
netif_stop_queue(dev);
}
spin_unlock_irqrestore(&lp->lock, flags);
return 0;
return NETDEV_TX_OK;
}
/*
This function returns all the memory mapped registers of the device.
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/appletalk/cops.c
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,7 @@ static int cops_send_packet(struct sk_buff *skb, struct net_device *dev)
dev->stats.tx_bytes += skb->len;
dev->trans_start = jiffies;
dev_kfree_skb (skb);
return 0;
return NETDEV_TX_OK;
}

/*
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/appletalk/ipddp.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ static int ipddp_xmit(struct sk_buff *skb, struct net_device *dev)
}
if(rt == NULL) {
spin_unlock(&ipddp_route_lock);
return 0;
return NETDEV_TX_OK;
}

our_addr = atalk_find_dev_addr(rt->dev);
Expand Down Expand Up @@ -181,7 +181,7 @@ static int ipddp_xmit(struct sk_buff *skb, struct net_device *dev)

spin_unlock(&ipddp_route_lock);

return 0;
return NETDEV_TX_OK;
}

/*
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/appletalk/ltpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,7 @@ static int ltpc_xmit(struct sk_buff *skb, struct net_device *dev)
dev->stats.tx_bytes += skb->len;

dev_kfree_skb(skb);
return 0;
return NETDEV_TX_OK;
}

/* initialization stuff */
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/ariadne.c
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ static int ariadne_start_xmit(struct sk_buff *skb, struct net_device *dev)
if (skb->len < ETH_ZLEN)
{
if (skb_padto(skb, ETH_ZLEN))
return 0;
return NETDEV_TX_OK;
len = ETH_ZLEN;
}

Expand Down Expand Up @@ -685,7 +685,7 @@ static int ariadne_start_xmit(struct sk_buff *skb, struct net_device *dev)
}
local_irq_restore(flags);

return 0;
return NETDEV_TX_OK;
}


Expand Down
2 changes: 1 addition & 1 deletion drivers/net/arm/am79c961a.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ am79c961_sendpacket(struct sk_buff *skb, struct net_device *dev)

dev_kfree_skb(skb);

return 0;
return NETDEV_TX_OK;
}

/*
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/arm/at91_ether.c
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ static int at91ether_start_xmit(struct sk_buff *skb, struct net_device *dev)
we free and return(0) or don't free and return 1 */
}

return 0;
return NETDEV_TX_OK;
}

/*
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/arm/ether1.c
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ ether1_sendpacket (struct sk_buff *skb, struct net_device *dev)
netif_stop_queue(dev);

out:
return 0;
return NETDEV_TX_OK;
}

static void
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/arm/ether3.c
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ ether3_sendpacket(struct sk_buff *skb, struct net_device *dev)
dev_kfree_skb(skb);
priv(dev)->stats.tx_dropped ++;
netif_start_queue(dev);
return 0;
return NETDEV_TX_OK;
}

length = (length + 1) & ~1;
Expand Down Expand Up @@ -562,7 +562,7 @@ ether3_sendpacket(struct sk_buff *skb, struct net_device *dev)
netif_stop_queue(dev);

out:
return 0;
return NETDEV_TX_OK;
}

static irqreturn_t
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/at1700.c
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ static int net_send_packet (struct sk_buff *skb, struct net_device *dev)
netif_start_queue (dev);
dev_kfree_skb (skb);

return 0;
return NETDEV_TX_OK;
}

/* The typical workload of the driver:
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/atarilance.c
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev )

if (len > skb->len) {
if (skb_padto(skb, len))
return 0;
return NETDEV_TX_OK;
}

netif_stop_queue (dev);
Expand Down Expand Up @@ -846,7 +846,7 @@ static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev )
lp->tx_full = 1;
spin_unlock_irqrestore (&lp->devlock, flags);

return 0;
return NETDEV_TX_OK;
}

/* The LANCE interrupt handler. */
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/atp.c
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ static int atp_send_packet(struct sk_buff *skb, struct net_device *dev)

dev->trans_start = jiffies;
dev_kfree_skb (skb);
return 0;
return NETDEV_TX_OK;
}


Expand Down
Loading

0 comments on commit 6ed1065

Please sign in to comment.