Skip to content

Commit d8a6472

Browse files
committed
Merge branch 'netdev_tx_t'
Luc Van Oostenryck says: ==================== net: always use netdev_tx_t for xmit()'s return type The ndo_start_xmit() methods should return a 'netdev_tx_t', not an int, and so should return NETDEV_TX_OK, not 0. The patches in the series fix most of the remaning drivers and subsystems (those included in allyesconfig on x86). ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents fe80536 + 2a78478 commit d8a6472

File tree

16 files changed

+20
-20
lines changed

16 files changed

+20
-20
lines changed

drivers/net/caif/caif_hsi.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,7 +1006,7 @@ static void cfhsi_aggregation_tout(struct timer_list *t)
10061006
cfhsi_start_tx(cfhsi);
10071007
}
10081008

1009-
static int cfhsi_xmit(struct sk_buff *skb, struct net_device *dev)
1009+
static netdev_tx_t cfhsi_xmit(struct sk_buff *skb, struct net_device *dev)
10101010
{
10111011
struct cfhsi *cfhsi = NULL;
10121012
int start_xfer = 0;
@@ -1072,7 +1072,7 @@ static int cfhsi_xmit(struct sk_buff *skb, struct net_device *dev)
10721072
spin_unlock_bh(&cfhsi->lock);
10731073
if (aggregate_ready)
10741074
cfhsi_start_tx(cfhsi);
1075-
return 0;
1075+
return NETDEV_TX_OK;
10761076
}
10771077

10781078
/* Delete inactivity timer if started. */
@@ -1102,7 +1102,7 @@ static int cfhsi_xmit(struct sk_buff *skb, struct net_device *dev)
11021102
queue_work(cfhsi->wq, &cfhsi->wake_up_work);
11031103
}
11041104

1105-
return 0;
1105+
return NETDEV_TX_OK;
11061106
}
11071107

11081108
static const struct net_device_ops cfhsi_netdevops;

drivers/net/caif/caif_serial.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ static int handle_tx(struct ser_device *ser)
266266
return tty_wr;
267267
}
268268

269-
static int caif_xmit(struct sk_buff *skb, struct net_device *dev)
269+
static netdev_tx_t caif_xmit(struct sk_buff *skb, struct net_device *dev)
270270
{
271271
struct ser_device *ser;
272272

drivers/net/caif/caif_spi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ static void cfspi_xfer_done_cb(struct cfspi_ifc *ifc)
488488
complete(&cfspi->comp);
489489
}
490490

491-
static int cfspi_xmit(struct sk_buff *skb, struct net_device *dev)
491+
static netdev_tx_t cfspi_xmit(struct sk_buff *skb, struct net_device *dev)
492492
{
493493
struct cfspi *cfspi = NULL;
494494
unsigned long flags;
@@ -514,7 +514,7 @@ static int cfspi_xmit(struct sk_buff *skb, struct net_device *dev)
514514
cfspi->cfdev.flowctrl(cfspi->ndev, 0);
515515
}
516516

517-
return 0;
517+
return NETDEV_TX_OK;
518518
}
519519

520520
int cfspi_rxfrm(struct cfspi *cfspi, u8 *buf, size_t len)

drivers/net/caif/caif_virtio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ static struct buf_info *cfv_alloc_and_copy_to_shm(struct cfv_info *cfv,
519519
}
520520

521521
/* Put the CAIF packet on the virtio ring and kick the receiver */
522-
static int cfv_netdev_tx(struct sk_buff *skb, struct net_device *netdev)
522+
static netdev_tx_t cfv_netdev_tx(struct sk_buff *skb, struct net_device *netdev)
523523
{
524524
struct cfv_info *cfv = netdev_priv(netdev);
525525
struct buf_info *buf_info;

drivers/net/ethernet/aquantia/atlantic/aq_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ static int aq_ndev_close(struct net_device *ndev)
9595
return err;
9696
}
9797

98-
static int aq_ndev_start_xmit(struct sk_buff *skb, struct net_device *ndev)
98+
static netdev_tx_t aq_ndev_start_xmit(struct sk_buff *skb, struct net_device *ndev)
9999
{
100100
struct aq_nic_s *aq_nic = netdev_priv(ndev);
101101

drivers/net/ethernet/arc/emac_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ static struct net_device_stats *arc_emac_stats(struct net_device *ndev)
673673
*
674674
* This function is invoked from upper layers to initiate transmission.
675675
*/
676-
static int arc_emac_tx(struct sk_buff *skb, struct net_device *ndev)
676+
static netdev_tx_t arc_emac_tx(struct sk_buff *skb, struct net_device *ndev)
677677
{
678678
struct arc_emac_priv *priv = netdev_priv(ndev);
679679
unsigned int len, *txbd_curr = &priv->txbd_curr;

drivers/net/ethernet/aurora/nb8800.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ static void nb8800_tx_dma_start_irq(struct net_device *dev)
384384
spin_unlock(&priv->tx_lock);
385385
}
386386

387-
static int nb8800_xmit(struct sk_buff *skb, struct net_device *dev)
387+
static netdev_tx_t nb8800_xmit(struct sk_buff *skb, struct net_device *dev)
388388
{
389389
struct nb8800_priv *priv = netdev_priv(dev);
390390
struct nb8800_tx_desc *txd;

drivers/net/ethernet/chelsio/cxgb4vf/adapter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ int t4vf_sge_alloc_eth_txq(struct adapter *, struct sge_eth_txq *,
562562
unsigned int);
563563
void t4vf_free_sge_resources(struct adapter *);
564564

565-
int t4vf_eth_xmit(struct sk_buff *, struct net_device *);
565+
netdev_tx_t t4vf_eth_xmit(struct sk_buff *, struct net_device *);
566566
int t4vf_ethrx_handler(struct sge_rspq *, const __be64 *,
567567
const struct pkt_gl *);
568568

drivers/net/ethernet/chelsio/cxgb4vf/sge.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1154,7 +1154,7 @@ static inline void txq_advance(struct sge_txq *tq, unsigned int n)
11541154
*
11551155
* Add a packet to an SGE Ethernet TX queue. Runs with softirqs disabled.
11561156
*/
1157-
int t4vf_eth_xmit(struct sk_buff *skb, struct net_device *dev)
1157+
netdev_tx_t t4vf_eth_xmit(struct sk_buff *skb, struct net_device *dev)
11581158
{
11591159
u32 wr_mid;
11601160
u64 cntrl, *end;

drivers/net/ethernet/netronome/nfp/nfp_net_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,7 @@ static int nfp_net_prep_tx_meta(struct sk_buff *skb, u64 tls_handle)
974974
*
975975
* Return: NETDEV_TX_OK on success.
976976
*/
977-
static int nfp_net_tx(struct sk_buff *skb, struct net_device *netdev)
977+
static netdev_tx_t nfp_net_tx(struct sk_buff *skb, struct net_device *netdev)
978978
{
979979
struct nfp_net *nn = netdev_priv(netdev);
980980
const skb_frag_t *frag;

drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2064,7 +2064,7 @@ static int pch_gbe_stop(struct net_device *netdev)
20642064
* - NETDEV_TX_OK: Normal end
20652065
* - NETDEV_TX_BUSY: Error end
20662066
*/
2067-
static int pch_gbe_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
2067+
static netdev_tx_t pch_gbe_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
20682068
{
20692069
struct pch_gbe_adapter *adapter = netdev_priv(netdev);
20702070
struct pch_gbe_tx_ring *tx_ring = adapter->tx_ring;

drivers/net/ethernet/synopsys/dwc-xlgmac-net.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ static void xlgmac_tx_timeout(struct net_device *netdev, unsigned int txqueue)
697697
schedule_work(&pdata->restart_work);
698698
}
699699

700-
static int xlgmac_xmit(struct sk_buff *skb, struct net_device *netdev)
700+
static netdev_tx_t xlgmac_xmit(struct sk_buff *skb, struct net_device *netdev)
701701
{
702702
struct xlgmac_pdata *pdata = netdev_priv(netdev);
703703
struct xlgmac_pkt_info *tx_pkt_info;

drivers/net/plip/plip.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ static void plip_timer_bh(struct work_struct *work);
142142
static void plip_interrupt(void *dev_id);
143143

144144
/* Functions for DEV methods */
145-
static int plip_tx_packet(struct sk_buff *skb, struct net_device *dev);
145+
static netdev_tx_t plip_tx_packet(struct sk_buff *skb, struct net_device *dev);
146146
static int plip_hard_header(struct sk_buff *skb, struct net_device *dev,
147147
unsigned short type, const void *daddr,
148148
const void *saddr, unsigned len);
@@ -958,7 +958,7 @@ plip_interrupt(void *dev_id)
958958
spin_unlock_irqrestore(&nl->lock, flags);
959959
}
960960

961-
static int
961+
static netdev_tx_t
962962
plip_tx_packet(struct sk_buff *skb, struct net_device *dev)
963963
{
964964
struct net_local *nl = netdev_priv(dev);

drivers/net/usb/ipheth.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ static int ipheth_close(struct net_device *net)
358358
return 0;
359359
}
360360

361-
static int ipheth_tx(struct sk_buff *skb, struct net_device *net)
361+
static netdev_tx_t ipheth_tx(struct sk_buff *skb, struct net_device *net)
362362
{
363363
struct ipheth_device *dev = netdev_priv(net);
364364
struct usb_device *udev = dev->udev;

net/hsr/hsr_device.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ static netdev_features_t hsr_fix_features(struct net_device *dev,
210210
return hsr_features_recompute(hsr, features);
211211
}
212212

213-
static int hsr_dev_xmit(struct sk_buff *skb, struct net_device *dev)
213+
static netdev_tx_t hsr_dev_xmit(struct sk_buff *skb, struct net_device *dev)
214214
{
215215
struct hsr_priv *hsr = netdev_priv(dev);
216216
struct hsr_port *master;

net/l2tp/l2tp_eth.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ static void l2tp_eth_dev_uninit(struct net_device *dev)
7373
*/
7474
}
7575

76-
static int l2tp_eth_dev_xmit(struct sk_buff *skb, struct net_device *dev)
76+
static netdev_tx_t l2tp_eth_dev_xmit(struct sk_buff *skb, struct net_device *dev)
7777
{
7878
struct l2tp_eth *priv = netdev_priv(dev);
7979
struct l2tp_session *session = priv->session;

0 commit comments

Comments
 (0)