All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/15] always use netdev_tx_t for xmit()'s return type
@ 2020-06-28 19:53 Luc Van Oostenryck
  2020-06-28 19:53 ` [PATCH 01/15] cail,hsi: fix cfhsi_xmit()'s " Luc Van Oostenryck
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: Luc Van Oostenryck @ 2020-06-28 19:53 UTC (permalink / raw)
  To: David S . Miller
  Cc: Jakub Kicinski, netdev, oss-drivers, linux-usb, linux-kernel,
	Luc Van Oostenryck

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(-)

-- 
2.27.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 01/15] cail,hsi: fix cfhsi_xmit()'s return type
  2020-06-28 19:53 [PATCH 00/15] always use netdev_tx_t for xmit()'s return type Luc Van Oostenryck
@ 2020-06-28 19:53 ` Luc Van Oostenryck
  2020-06-28 19:53 ` [PATCH 02/15] caif: fix caif_xmit()'s " Luc Van Oostenryck
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Luc Van Oostenryck @ 2020-06-28 19:53 UTC (permalink / raw)
  To: David S . Miller
  Cc: Jakub Kicinski, netdev, oss-drivers, linux-usb, linux-kernel,
	Luc Van Oostenryck

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.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 drivers/net/caif/caif_hsi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/caif/caif_hsi.c b/drivers/net/caif/caif_hsi.c
index bbb2575d4728..4a33ec4fc089 100644
--- a/drivers/net/caif/caif_hsi.c
+++ b/drivers/net/caif/caif_hsi.c
@@ -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;
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 02/15] caif: fix caif_xmit()'s return type
  2020-06-28 19:53 [PATCH 00/15] always use netdev_tx_t for xmit()'s return type Luc Van Oostenryck
  2020-06-28 19:53 ` [PATCH 01/15] cail,hsi: fix cfhsi_xmit()'s " Luc Van Oostenryck
@ 2020-06-28 19:53 ` Luc Van Oostenryck
  2020-06-28 19:53 ` [PATCH 03/15] caif: fix cfspi_xmit()'s " Luc Van Oostenryck
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Luc Van Oostenryck @ 2020-06-28 19:53 UTC (permalink / raw)
  To: David S . Miller
  Cc: Jakub Kicinski, netdev, oss-drivers, linux-usb, linux-kernel,
	Luc Van Oostenryck

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.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 drivers/net/caif/caif_serial.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/caif/caif_serial.c b/drivers/net/caif/caif_serial.c
index d737ceb61203..bcc14c5875bf 100644
--- a/drivers/net/caif/caif_serial.c
+++ b/drivers/net/caif/caif_serial.c
@@ -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;
 
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 03/15] caif: fix cfspi_xmit()'s return type
  2020-06-28 19:53 [PATCH 00/15] always use netdev_tx_t for xmit()'s return type Luc Van Oostenryck
  2020-06-28 19:53 ` [PATCH 01/15] cail,hsi: fix cfhsi_xmit()'s " Luc Van Oostenryck
  2020-06-28 19:53 ` [PATCH 02/15] caif: fix caif_xmit()'s " Luc Van Oostenryck
@ 2020-06-28 19:53 ` Luc Van Oostenryck
  2020-06-28 19:53 ` [PATCH 04/15] caif: fix cfv_netdev_tx()'s " Luc Van Oostenryck
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Luc Van Oostenryck @ 2020-06-28 19:53 UTC (permalink / raw)
  To: David S . Miller
  Cc: Jakub Kicinski, netdev, oss-drivers, linux-usb, linux-kernel,
	Luc Van Oostenryck

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.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 drivers/net/caif/caif_spi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/caif/caif_spi.c b/drivers/net/caif/caif_spi.c
index 63f2548f5b1b..7d5899626130 100644
--- a/drivers/net/caif/caif_spi.c
+++ b/drivers/net/caif/caif_spi.c
@@ -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)
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 04/15] caif: fix cfv_netdev_tx()'s return type
  2020-06-28 19:53 [PATCH 00/15] always use netdev_tx_t for xmit()'s return type Luc Van Oostenryck
                   ` (2 preceding siblings ...)
  2020-06-28 19:53 ` [PATCH 03/15] caif: fix cfspi_xmit()'s " Luc Van Oostenryck
@ 2020-06-28 19:53 ` Luc Van Oostenryck
  2020-06-28 19:53 ` [PATCH 05/15] net: aquantia: fix aq_ndev_start_xmit()'s " Luc Van Oostenryck
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Luc Van Oostenryck @ 2020-06-28 19:53 UTC (permalink / raw)
  To: David S . Miller
  Cc: Jakub Kicinski, netdev, oss-drivers, linux-usb, linux-kernel,
	Luc Van Oostenryck

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.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 drivers/net/caif/caif_virtio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/caif/caif_virtio.c b/drivers/net/caif/caif_virtio.c
index eb426822ad06..80ea2e913c2b 100644
--- a/drivers/net/caif/caif_virtio.c
+++ b/drivers/net/caif/caif_virtio.c
@@ -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;
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 05/15] net: aquantia: fix aq_ndev_start_xmit()'s return type
  2020-06-28 19:53 [PATCH 00/15] always use netdev_tx_t for xmit()'s return type Luc Van Oostenryck
                   ` (3 preceding siblings ...)
  2020-06-28 19:53 ` [PATCH 04/15] caif: fix cfv_netdev_tx()'s " Luc Van Oostenryck
@ 2020-06-28 19:53 ` Luc Van Oostenryck
  2020-06-28 19:53 ` [PATCH 06/15] net: arc_emac: fix arc_emac_tx()'s " Luc Van Oostenryck
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Luc Van Oostenryck @ 2020-06-28 19:53 UTC (permalink / raw)
  To: David S . Miller
  Cc: Jakub Kicinski, netdev, oss-drivers, linux-usb, linux-kernel,
	Luc Van Oostenryck

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.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 drivers/net/ethernet/aquantia/atlantic/aq_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_main.c b/drivers/net/ethernet/aquantia/atlantic/aq_main.c
index 8a1da044e908..6c85005cd2e9 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_main.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_main.c
@@ -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);
 
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 06/15] net: arc_emac: fix arc_emac_tx()'s return type
  2020-06-28 19:53 [PATCH 00/15] always use netdev_tx_t for xmit()'s return type Luc Van Oostenryck
                   ` (4 preceding siblings ...)
  2020-06-28 19:53 ` [PATCH 05/15] net: aquantia: fix aq_ndev_start_xmit()'s " Luc Van Oostenryck
@ 2020-06-28 19:53 ` Luc Van Oostenryck
  2020-06-28 19:53 ` [PATCH 07/15] net: nb8800: fix nb8800_xmit()'s " Luc Van Oostenryck
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Luc Van Oostenryck @ 2020-06-28 19:53 UTC (permalink / raw)
  To: David S . Miller
  Cc: Jakub Kicinski, netdev, oss-drivers, linux-usb, linux-kernel,
	Luc Van Oostenryck

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.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 drivers/net/ethernet/arc/emac_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/arc/emac_main.c b/drivers/net/ethernet/arc/emac_main.c
index 38cd968b6a3b..b56a9e2aecd9 100644
--- a/drivers/net/ethernet/arc/emac_main.c
+++ b/drivers/net/ethernet/arc/emac_main.c
@@ -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;
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 07/15] net: nb8800: fix nb8800_xmit()'s return type
  2020-06-28 19:53 [PATCH 00/15] always use netdev_tx_t for xmit()'s return type Luc Van Oostenryck
                   ` (5 preceding siblings ...)
  2020-06-28 19:53 ` [PATCH 06/15] net: arc_emac: fix arc_emac_tx()'s " Luc Van Oostenryck
@ 2020-06-28 19:53 ` Luc Van Oostenryck
  2020-06-28 19:53 ` [PATCH 08/15] net: nfp: fix nfp_net_tx()'s " Luc Van Oostenryck
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Luc Van Oostenryck @ 2020-06-28 19:53 UTC (permalink / raw)
  To: David S . Miller
  Cc: Jakub Kicinski, netdev, oss-drivers, linux-usb, linux-kernel,
	Luc Van Oostenryck

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.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 drivers/net/ethernet/aurora/nb8800.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/aurora/nb8800.c b/drivers/net/ethernet/aurora/nb8800.c
index bc273e0db7ff..5b20185cbd62 100644
--- a/drivers/net/ethernet/aurora/nb8800.c
+++ b/drivers/net/ethernet/aurora/nb8800.c
@@ -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;
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 08/15] net: nfp: fix nfp_net_tx()'s return type
  2020-06-28 19:53 [PATCH 00/15] always use netdev_tx_t for xmit()'s return type Luc Van Oostenryck
                   ` (6 preceding siblings ...)
  2020-06-28 19:53 ` [PATCH 07/15] net: nb8800: fix nb8800_xmit()'s " Luc Van Oostenryck
@ 2020-06-28 19:53 ` Luc Van Oostenryck
  2020-06-28 19:53 ` [PATCH 09/15] net: pch_gbe: fix pch_gbe_xmit_frame()'s " Luc Van Oostenryck
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Luc Van Oostenryck @ 2020-06-28 19:53 UTC (permalink / raw)
  To: David S . Miller
  Cc: Jakub Kicinski, netdev, oss-drivers, linux-usb, linux-kernel,
	Luc Van Oostenryck

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.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
index 0e0cc3d58bdc..83ff18140bfe 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
+++ b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
@@ -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;
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 09/15] net: pch_gbe: fix pch_gbe_xmit_frame()'s return type
  2020-06-28 19:53 [PATCH 00/15] always use netdev_tx_t for xmit()'s return type Luc Van Oostenryck
                   ` (7 preceding siblings ...)
  2020-06-28 19:53 ` [PATCH 08/15] net: nfp: fix nfp_net_tx()'s " Luc Van Oostenryck
@ 2020-06-28 19:53 ` Luc Van Oostenryck
  2020-06-28 19:53 ` [PATCH 10/15] net: dwc-xlgmac: fix xlgmac_xmit()'s " Luc Van Oostenryck
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Luc Van Oostenryck @ 2020-06-28 19:53 UTC (permalink / raw)
  To: David S . Miller
  Cc: Jakub Kicinski, netdev, oss-drivers, linux-usb, linux-kernel,
	Luc Van Oostenryck

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.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
index 73ec195fbc30..23f7c76737c9 100644
--- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
+++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
@@ -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;
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 10/15] net: dwc-xlgmac: fix xlgmac_xmit()'s return type
  2020-06-28 19:53 [PATCH 00/15] always use netdev_tx_t for xmit()'s return type Luc Van Oostenryck
                   ` (8 preceding siblings ...)
  2020-06-28 19:53 ` [PATCH 09/15] net: pch_gbe: fix pch_gbe_xmit_frame()'s " Luc Van Oostenryck
@ 2020-06-28 19:53 ` Luc Van Oostenryck
  2020-06-28 19:53 ` [PATCH 11/15] net: plip: fix plip_tx_packet()'s " Luc Van Oostenryck
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Luc Van Oostenryck @ 2020-06-28 19:53 UTC (permalink / raw)
  To: David S . Miller
  Cc: Jakub Kicinski, netdev, oss-drivers, linux-usb, linux-kernel,
	Luc Van Oostenryck

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.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 drivers/net/ethernet/synopsys/dwc-xlgmac-net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/synopsys/dwc-xlgmac-net.c b/drivers/net/ethernet/synopsys/dwc-xlgmac-net.c
index 07046a2370b3..26aa7f32151f 100644
--- a/drivers/net/ethernet/synopsys/dwc-xlgmac-net.c
+++ b/drivers/net/ethernet/synopsys/dwc-xlgmac-net.c
@@ -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;
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 11/15] net: plip: fix plip_tx_packet()'s return type
  2020-06-28 19:53 [PATCH 00/15] always use netdev_tx_t for xmit()'s return type Luc Van Oostenryck
                   ` (9 preceding siblings ...)
  2020-06-28 19:53 ` [PATCH 10/15] net: dwc-xlgmac: fix xlgmac_xmit()'s " Luc Van Oostenryck
@ 2020-06-28 19:53 ` Luc Van Oostenryck
  2020-06-28 19:53 ` [PATCH 12/15] usbnet: ipheth: fix ipheth_tx()'s " Luc Van Oostenryck
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Luc Van Oostenryck @ 2020-06-28 19:53 UTC (permalink / raw)
  To: David S . Miller
  Cc: Jakub Kicinski, netdev, oss-drivers, linux-usb, linux-kernel,
	Luc Van Oostenryck

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.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 drivers/net/plip/plip.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/plip/plip.c b/drivers/net/plip/plip.c
index e89cdebae6f1..d82016dcde3b 100644
--- a/drivers/net/plip/plip.c
+++ b/drivers/net/plip/plip.c
@@ -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);
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 12/15] usbnet: ipheth: fix ipheth_tx()'s return type
  2020-06-28 19:53 [PATCH 00/15] always use netdev_tx_t for xmit()'s return type Luc Van Oostenryck
                   ` (10 preceding siblings ...)
  2020-06-28 19:53 ` [PATCH 11/15] net: plip: fix plip_tx_packet()'s " Luc Van Oostenryck
@ 2020-06-28 19:53 ` Luc Van Oostenryck
  2020-06-28 19:53 ` [PATCH 13/15] net/hsr: fix hsr_dev_xmit()'s " Luc Van Oostenryck
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Luc Van Oostenryck @ 2020-06-28 19:53 UTC (permalink / raw)
  To: David S . Miller
  Cc: Jakub Kicinski, netdev, oss-drivers, linux-usb, linux-kernel,
	Luc Van Oostenryck

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.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 drivers/net/usb/ipheth.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/usb/ipheth.c b/drivers/net/usb/ipheth.c
index c792d65dd7b4..b09b45382faf 100644
--- a/drivers/net/usb/ipheth.c
+++ b/drivers/net/usb/ipheth.c
@@ -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;
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 13/15] net/hsr: fix hsr_dev_xmit()'s return type
  2020-06-28 19:53 [PATCH 00/15] always use netdev_tx_t for xmit()'s return type Luc Van Oostenryck
                   ` (11 preceding siblings ...)
  2020-06-28 19:53 ` [PATCH 12/15] usbnet: ipheth: fix ipheth_tx()'s " Luc Van Oostenryck
@ 2020-06-28 19:53 ` Luc Van Oostenryck
  2020-06-28 19:53 ` [PATCH 14/15] l2tp: fix l2tp_eth_dev_xmit()'s " Luc Van Oostenryck
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Luc Van Oostenryck @ 2020-06-28 19:53 UTC (permalink / raw)
  To: David S . Miller
  Cc: Jakub Kicinski, netdev, oss-drivers, linux-usb, linux-kernel,
	Luc Van Oostenryck

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.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 net/hsr/hsr_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/hsr/hsr_device.c b/net/hsr/hsr_device.c
index cd99f548e440..7be85e024236 100644
--- a/net/hsr/hsr_device.c
+++ b/net/hsr/hsr_device.c
@@ -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;
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 14/15] l2tp: fix l2tp_eth_dev_xmit()'s return type
  2020-06-28 19:53 [PATCH 00/15] always use netdev_tx_t for xmit()'s return type Luc Van Oostenryck
                   ` (12 preceding siblings ...)
  2020-06-28 19:53 ` [PATCH 13/15] net/hsr: fix hsr_dev_xmit()'s " Luc Van Oostenryck
@ 2020-06-28 19:53 ` Luc Van Oostenryck
  2020-06-28 19:53 ` [PATCH 15/15] cxgb4vf: fix t4vf_eth_xmit()'s " Luc Van Oostenryck
  2020-06-29  3:53 ` [PATCH 00/15] always use netdev_tx_t for xmit()'s " David Miller
  15 siblings, 0 replies; 17+ messages in thread
From: Luc Van Oostenryck @ 2020-06-28 19:53 UTC (permalink / raw)
  To: David S . Miller
  Cc: Jakub Kicinski, netdev, oss-drivers, linux-usb, linux-kernel,
	Luc Van Oostenryck

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.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 net/l2tp/l2tp_eth.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/l2tp/l2tp_eth.c b/net/l2tp/l2tp_eth.c
index fd5ac2788e45..3099efa19249 100644
--- a/net/l2tp/l2tp_eth.c
+++ b/net/l2tp/l2tp_eth.c
@@ -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;
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 15/15] cxgb4vf: fix t4vf_eth_xmit()'s return type
  2020-06-28 19:53 [PATCH 00/15] always use netdev_tx_t for xmit()'s return type Luc Van Oostenryck
                   ` (13 preceding siblings ...)
  2020-06-28 19:53 ` [PATCH 14/15] l2tp: fix l2tp_eth_dev_xmit()'s " Luc Van Oostenryck
@ 2020-06-28 19:53 ` Luc Van Oostenryck
  2020-06-29  3:53 ` [PATCH 00/15] always use netdev_tx_t for xmit()'s " David Miller
  15 siblings, 0 replies; 17+ messages in thread
From: Luc Van Oostenryck @ 2020-06-28 19:53 UTC (permalink / raw)
  To: David S . Miller
  Cc: Jakub Kicinski, netdev, oss-drivers, linux-usb, linux-kernel,
	Luc Van Oostenryck

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.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 drivers/net/ethernet/chelsio/cxgb4vf/adapter.h | 2 +-
 drivers/net/ethernet/chelsio/cxgb4vf/sge.c     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/adapter.h b/drivers/net/ethernet/chelsio/cxgb4vf/adapter.h
index 3782e48dada2..f55105a4112f 100644
--- a/drivers/net/ethernet/chelsio/cxgb4vf/adapter.h
+++ b/drivers/net/ethernet/chelsio/cxgb4vf/adapter.h
@@ -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 *);
 
diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/sge.c b/drivers/net/ethernet/chelsio/cxgb4vf/sge.c
index f71c973398ec..46e50e25dbba 100644
--- a/drivers/net/ethernet/chelsio/cxgb4vf/sge.c
+++ b/drivers/net/ethernet/chelsio/cxgb4vf/sge.c
@@ -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;
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH 00/15] always use netdev_tx_t for xmit()'s return type
  2020-06-28 19:53 [PATCH 00/15] always use netdev_tx_t for xmit()'s return type Luc Van Oostenryck
                   ` (14 preceding siblings ...)
  2020-06-28 19:53 ` [PATCH 15/15] cxgb4vf: fix t4vf_eth_xmit()'s " Luc Van Oostenryck
@ 2020-06-29  3:53 ` David Miller
  15 siblings, 0 replies; 17+ messages in thread
From: David Miller @ 2020-06-29  3:53 UTC (permalink / raw)
  To: luc.vanoostenryck; +Cc: kuba, netdev, oss-drivers, linux-usb, linux-kernel

From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Date: Sun, 28 Jun 2020 21:53:22 +0200

> 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).

Series applied, thanks.

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2020-06-29 20:52 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-28 19:53 [PATCH 00/15] always use netdev_tx_t for xmit()'s return type Luc Van Oostenryck
2020-06-28 19:53 ` [PATCH 01/15] cail,hsi: fix cfhsi_xmit()'s " Luc Van Oostenryck
2020-06-28 19:53 ` [PATCH 02/15] caif: fix caif_xmit()'s " Luc Van Oostenryck
2020-06-28 19:53 ` [PATCH 03/15] caif: fix cfspi_xmit()'s " Luc Van Oostenryck
2020-06-28 19:53 ` [PATCH 04/15] caif: fix cfv_netdev_tx()'s " Luc Van Oostenryck
2020-06-28 19:53 ` [PATCH 05/15] net: aquantia: fix aq_ndev_start_xmit()'s " Luc Van Oostenryck
2020-06-28 19:53 ` [PATCH 06/15] net: arc_emac: fix arc_emac_tx()'s " Luc Van Oostenryck
2020-06-28 19:53 ` [PATCH 07/15] net: nb8800: fix nb8800_xmit()'s " Luc Van Oostenryck
2020-06-28 19:53 ` [PATCH 08/15] net: nfp: fix nfp_net_tx()'s " Luc Van Oostenryck
2020-06-28 19:53 ` [PATCH 09/15] net: pch_gbe: fix pch_gbe_xmit_frame()'s " Luc Van Oostenryck
2020-06-28 19:53 ` [PATCH 10/15] net: dwc-xlgmac: fix xlgmac_xmit()'s " Luc Van Oostenryck
2020-06-28 19:53 ` [PATCH 11/15] net: plip: fix plip_tx_packet()'s " Luc Van Oostenryck
2020-06-28 19:53 ` [PATCH 12/15] usbnet: ipheth: fix ipheth_tx()'s " Luc Van Oostenryck
2020-06-28 19:53 ` [PATCH 13/15] net/hsr: fix hsr_dev_xmit()'s " Luc Van Oostenryck
2020-06-28 19:53 ` [PATCH 14/15] l2tp: fix l2tp_eth_dev_xmit()'s " Luc Van Oostenryck
2020-06-28 19:53 ` [PATCH 15/15] cxgb4vf: fix t4vf_eth_xmit()'s " Luc Van Oostenryck
2020-06-29  3:53 ` [PATCH 00/15] always use netdev_tx_t for xmit()'s " David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.