always use netdev_tx_t for xmit()'s return type
Subsystems (9)
cover 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).
Luc Van Oostenryck (15):
cail,hsi: fix cfhsi_xmit()'s return type
caif: fix caif_xmit()'s return type
caif: fix cfspi_xmit()'s return type
caif: fix cfv_netdev_tx()'s return type
net: aquantia: fix aq_ndev_start_xmit()'s return type
net: arc_emac: fix arc_emac_tx()'s return type
net: nb8800: fix nb8800_xmit()'s return type
net: nfp: fix nfp_net_tx()'s return type
net: pch_gbe: fix pch_gbe_xmit_frame()'s return type
net: dwc-xlgmac: fix xlgmac_xmit()'s return type
net: plip: fix plip_tx_packet()'s return type
usbnet: ipheth: fix ipheth_tx()'s return type net/hsr: fix hsr_dev_xmit()'s return type
l2tp: fix l2tp_eth_dev_xmit()'s return type
cxgb4vf: fix t4vf_eth_xmit()'s return type
drivers/net/caif/caif_hsi.c | 6 +++--- drivers/net/caif/caif_serial.c | 2 +- drivers/net/caif/caif_spi.c | 4 ++-- drivers/net/caif/caif_virtio.c | 2 +- drivers/net/ethernet/aquantia/atlantic/aq_main.c | 2 +- drivers/net/ethernet/arc/emac_main.c | 2 +- drivers/net/ethernet/aurora/nb8800.c | 2 +- drivers/net/ethernet/chelsio/cxgb4vf/adapter.h | 2 +- drivers/net/ethernet/chelsio/cxgb4vf/sge.c | 2 +- drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 2 +- drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 2 +- drivers/net/ethernet/synopsys/dwc-xlgmac-net.c | 2 +- drivers/net/plip/plip.c | 4 ++-- drivers/net/usb/ipheth.c | 2 +- net/hsr/hsr_device.c | 2 +- net/l2tp/l2tp_eth.c | 2 +- 16 files changed, 20 insertions(+), 20 deletions(-)
Signature · 1 line
2.27.0
PATCH 1/15 cail,hsi: fix cfhsi_xmit()'s return type
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, but the implementation in this driver returns an 'int'.
Fix this by returning 'netdev_tx_t' in this driver too and returning NETDEV_TX_OK instead of 0 accordingly.
--- drivers/net/caif/caif_hsi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/caif/caif_hsi.c +3 -3
@@ -1006,7 +1006,7 @@ static void cfhsi_aggregation_tout(struct timer_list *t)cfhsi_start_tx (cfhsi); } -static int cfhsi_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t cfhsi_xmit (struct sk_buff *skb,struct net_device *dev) {struct cfhsi *cfhsi =NULL ;int start_xfer =0 ;
@@ -1072,7 +1072,7 @@ static int cfhsi_xmit(struct sk_buff *skb, struct net_device *dev)spin_unlock_bh (&cfhsi->lock);if (aggregate_ready)cfhsi_start_tx (cfhsi); -return 0 ; +return NETDEV_TX_OK ; }/* Delete inactivity timer if started. */
@@ -1102,7 +1102,7 @@ static int cfhsi_xmit(struct sk_buff *skb, struct net_device *dev)queue_work (cfhsi->wq, &cfhsi->wake_up_work); } -return 0 ; +return NETDEV_TX_OK ; }static const struct net_device_ops cfhsi_netdevops;
Signature · 1 line
2.27.0
PATCH 2/15 caif: fix caif_xmit()'s return type
In reply to Luc Van OostenryckThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, but the implementation in this driver returns an 'int'.
Fix this by returning 'netdev_tx_t' in this driver too.
--- drivers/net/caif/caif_serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/caif/caif_serial.c +1 -1
@@ -266,7 +266,7 @@ static int handle_tx(struct ser_device *ser)return tty_wr; } -static int caif_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t caif_xmit (struct sk_buff *skb,struct net_device *dev) {struct ser_device *ser;
Signature · 1 line
2.27.0
PATCH 3/15 caif: fix cfspi_xmit()'s return type
In reply to Luc Van OostenryckThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, but the implementation in this driver returns an 'int'.
Fix this by returning 'netdev_tx_t' in this driver too and returning NETDEV_TX_OK instead of 0 accordingly.
--- drivers/net/caif/caif_spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/caif/caif_spi.c +2 -2
@@ -488,7 +488,7 @@ static void cfspi_xfer_done_cb(struct cfspi_ifc *ifc)complete (&cfspi->comp); } -static int cfspi_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t cfspi_xmit (struct sk_buff *skb,struct net_device *dev) {struct cfspi *cfspi =NULL ;unsigned long flags;
@@ -514,7 +514,7 @@ static int cfspi_xmit(struct sk_buff *skb, struct net_device *dev) cfspi->cfdev.flowctrl (cfspi->ndev,0 ); } -return 0 ; +return NETDEV_TX_OK ; }int cfspi_rxfrm (struct cfspi *cfspi,u8 *buf,size_t len)
Signature · 1 line
2.27.0
PATCH 4/15 caif: fix cfv_netdev_tx()'s return type
In reply to Luc Van OostenryckThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, but the implementation in this driver returns an 'int'.
Fix this by returning 'netdev_tx_t' in this driver too.
--- drivers/net/caif/caif_virtio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/caif/caif_virtio.c +1 -1
@@ -519,7 +519,7 @@ static struct buf_info *cfv_alloc_and_copy_to_shm(struct cfv_info *cfv, }/* Put the CAIF packet on the virtio ring and kick the receiver */ -static int cfv_netdev_tx (struct sk_buff *skb,struct net_device *netdev) +static netdev_tx_t cfv_netdev_tx (struct sk_buff *skb,struct net_device *netdev) {struct cfv_info *cfv =netdev_priv (netdev);struct buf_info *buf_info;
Signature · 1 line
2.27.0
PATCH 5/15 net: aquantia: fix aq_ndev_start_xmit()'s return type
In reply to Luc Van OostenryckThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, but the implementation in this driver returns an 'int'.
Fix this by returning 'netdev_tx_t' in this driver too.
--- drivers/net/ethernet/aquantia/atlantic/aq_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/aquantia/atlantic/aq_main.c +1 -1
@@ -94,7 +94,7 @@ static int aq_ndev_close(struct net_device *ndev)return err; } -static int aq_ndev_start_xmit (struct sk_buff *skb,struct net_device *ndev) +static netdev_tx_t aq_ndev_start_xmit (struct sk_buff *skb,struct net_device *ndev) {struct aq_nic_s *aq_nic =netdev_priv (ndev);
Signature · 1 line
2.27.0
PATCH 6/15 net: arc_emac: fix arc_emac_tx()'s return type
In reply to Luc Van OostenryckThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, but the implementation in this driver returns an 'int'.
Fix this by returning 'netdev_tx_t' in this driver too.
--- drivers/net/ethernet/arc/emac_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/arc/emac_main.c +1 -1
@@ -673,7 +673,7 @@ static struct net_device_stats *arc_emac_stats(struct net_device *ndev)* * This function is invoked from upper layers to initiate transmission. */ -static int arc_emac_tx (struct sk_buff *skb,struct net_device *ndev) +static netdev_tx_t arc_emac_tx (struct sk_buff *skb,struct net_device *ndev) {struct arc_emac_priv *priv =netdev_priv (ndev);unsigned int len, *txbd_curr = &priv->txbd_curr;
Signature · 1 line
2.27.0
PATCH 7/15 net: nb8800: fix nb8800_xmit()'s return type
In reply to Luc Van OostenryckThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, but the implementation in this driver returns an 'int'.
Fix this by returning 'netdev_tx_t' in this driver too.
--- drivers/net/ethernet/aurora/nb8800.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/aurora/nb8800.c +1 -1
@@ -384,7 +384,7 @@ static void nb8800_tx_dma_start_irq(struct net_device *dev)spin_unlock (&priv->tx_lock); } -static int nb8800_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t nb8800_xmit (struct sk_buff *skb,struct net_device *dev) {struct nb8800_priv *priv =netdev_priv (dev);struct nb8800_tx_desc *txd;
Signature · 1 line
2.27.0
PATCH 8/15 net: nfp: fix nfp_net_tx()'s return type
In reply to Luc Van OostenryckThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, but the implementation in this driver returns an 'int'.
Fix this by returning 'netdev_tx_t' in this driver too.
--- drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/netronome/nfp/nfp_net_common.c +1 -1
@@ -974,7 +974,7 @@ static int nfp_net_prep_tx_meta(struct sk_buff *skb, u64 tls_handle)* * Return: NETDEV_TX_OK on success. */ -static int nfp_net_tx (struct sk_buff *skb,struct net_device *netdev) +static netdev_tx_t nfp_net_tx (struct sk_buff *skb,struct net_device *netdev) {struct nfp_net *nn =netdev_priv (netdev);const skb_frag_t *frag;
Signature · 1 line
2.27.0
PATCH 9/15 net: pch_gbe: fix pch_gbe_xmit_frame()'s return type
In reply to Luc Van OostenryckThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, but the implementation in this driver returns an 'int'.
Fix this by returning 'netdev_tx_t' in this driver too.
--- drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c +1 -1
@@ -2064,7 +2064,7 @@ static int pch_gbe_stop(struct net_device *netdev)* - NETDEV_TX_OK: Normal end * - NETDEV_TX_BUSY: Error end */ -static int pch_gbe_xmit_frame (struct sk_buff *skb,struct net_device *netdev) +static netdev_tx_t pch_gbe_xmit_frame (struct sk_buff *skb,struct net_device *netdev) {struct pch_gbe_adapter *adapter =netdev_priv (netdev);struct pch_gbe_tx_ring *tx_ring = adapter->tx_ring;
Signature · 1 line
2.27.0
PATCH 10/15 net: dwc-xlgmac: fix xlgmac_xmit()'s return type
In reply to Luc Van OostenryckThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, but the implementation in this driver returns an 'int'.
Fix this by returning 'netdev_tx_t' in this driver too.
--- drivers/net/ethernet/synopsys/dwc-xlgmac-net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/synopsys/dwc-xlgmac-net.c +1 -1
@@ -697,7 +697,7 @@ static void xlgmac_tx_timeout(struct net_device *netdev, unsigned int txqueue)schedule_work (&pdata->restart_work); } -static int xlgmac_xmit (struct sk_buff *skb,struct net_device *netdev) +static netdev_tx_t xlgmac_xmit (struct sk_buff *skb,struct net_device *netdev) {struct xlgmac_pdata *pdata =netdev_priv (netdev);struct xlgmac_pkt_info *tx_pkt_info;
Signature · 1 line
2.27.0
PATCH 11/15 net: plip: fix plip_tx_packet()'s return type
In reply to Luc Van OostenryckThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, but the implementation in this driver returns an 'int'.
Fix this by returning 'netdev_tx_t' in this driver too.
--- drivers/net/plip/plip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/plip/plip.c +2 -2
@@ -142,7 +142,7 @@ static void plip_timer_bh(struct work_struct *work);static void plip_interrupt (void *dev_id);/* Functions for DEV methods */ -static int plip_tx_packet (struct sk_buff *skb,struct net_device *dev); +static netdev_tx_t plip_tx_packet (struct sk_buff *skb,struct net_device *dev);static int plip_hard_header (struct sk_buff *skb,struct net_device *dev,unsigned short type,const void *daddr,const void *saddr,unsigned len);
@@ -958,7 +958,7 @@ plip_interrupt(void *dev_id)spin_unlock_irqrestore (&nl->lock, flags); } -static int +static netdev_tx_t plip_tx_packet (struct sk_buff *skb,struct net_device *dev) {struct net_local *nl =netdev_priv (dev);
Signature · 1 line
2.27.0
PATCH 12/15 usbnet: ipheth: fix ipheth_tx()'s return type
In reply to Luc Van OostenryckThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, but the implementation in this driver returns an 'int'.
Fix this by returning 'netdev_tx_t' in this driver too.
--- drivers/net/usb/ipheth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/usb/ipheth.c +1 -1
@@ -358,7 +358,7 @@ static int ipheth_close(struct net_device *net)return 0 ; } -static int ipheth_tx (struct sk_buff *skb,struct net_device *net) +static netdev_tx_t ipheth_tx (struct sk_buff *skb,struct net_device *net) {struct ipheth_device *dev =netdev_priv (net);struct usb_device *udev = dev->udev;
Signature · 1 line
2.27.0
PATCH 13/15 net/hsr: fix hsr_dev_xmit()'s return type
In reply to Luc Van OostenryckThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, but the implementation in this driver returns an 'int'.
Fix this by returning 'netdev_tx_t' in this driver too.
--- net/hsr/hsr_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/hsr/hsr_device.c +1 -1
@@ -210,7 +210,7 @@ static netdev_features_t hsr_fix_features(struct net_device *dev,return hsr_features_recompute (hsr, features); } -static int hsr_dev_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t hsr_dev_xmit (struct sk_buff *skb,struct net_device *dev) {struct hsr_priv *hsr =netdev_priv (dev);struct hsr_port *master;
Signature · 1 line
2.27.0
PATCH 14/15 l2tp: fix l2tp_eth_dev_xmit()'s return type
In reply to Luc Van OostenryckThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, but the implementation in this driver returns an 'int'.
Fix this by returning 'netdev_tx_t' in this driver too.
--- net/l2tp/l2tp_eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/l2tp/l2tp_eth.c +1 -1
@@ -73,7 +73,7 @@ static void l2tp_eth_dev_uninit(struct net_device *dev)*/ } -static int l2tp_eth_dev_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t l2tp_eth_dev_xmit (struct sk_buff *skb,struct net_device *dev) {struct l2tp_eth *priv =netdev_priv (dev);struct l2tp_session *session = priv->session;
Signature · 1 line
2.27.0
PATCH 15/15 cxgb4vf: fix t4vf_eth_xmit()'s return type
In reply to Luc Van OostenryckThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, but the implementation in this driver returns an 'int'.
Fix this by returning 'netdev_tx_t' in this driver too.
--- drivers/net/ethernet/chelsio/cxgb4vf/adapter.h | 2 +- drivers/net/ethernet/chelsio/cxgb4vf/sge.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/chelsio/cxgb4vf/adapter.h +1 -1
@@ -562,7 +562,7 @@ int t4vf_sge_alloc_eth_txq(struct adapter *, struct sge_eth_txq *, unsigned int);void t4vf_free_sge_resources (struct adapter *); -int t4vf_eth_xmit (struct sk_buff *,struct net_device *); +netdev_tx_t t4vf_eth_xmit (struct sk_buff *,struct net_device *);int t4vf_ethrx_handler (struct sge_rspq *,const __be64 *,const struct pkt_gl *);
drivers/net/ethernet/chelsio/cxgb4vf/sge.c +1 -1
@@ -1154,7 +1154,7 @@ static inline void txq_advance(struct sge_txq *tq, unsigned int n)* * Add a packet to an SGE Ethernet TX queue. Runs with softirqs disabled. */ -int t4vf_eth_xmit (struct sk_buff *skb,struct net_device *dev) +netdev_tx_t t4vf_eth_xmit (struct sk_buff *skb,struct net_device *dev) {u32 wr_mid;u64 cntrl, *end;
Signature · 1 line
2.27.0
David Miller
maintainerFrom: Luc Van Oostenryck <[email protected]>
Date: Sun, 28 Jun 2020 21:53:22 +0200
Quoted 4 lines
The
ndo_start_xmit()methods should return a 'netdev_tx_t', not an int, and so should returnNETDEV_TX_OK, not 0.
The patches in the series fix most of the remaning drivers and subsystems (those included in allyesconfig on x86).
Series applied, thanks.