Commit 13d5bc50 authored by YueHaibing's avatar YueHaibing Committed by Greg Kroah-Hartman

net: ibm: fix return type of ndo_start_xmit function

[ Upstream commit 94b2bb28 ]

The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
which is a typedef for an enum type, so make sure the implementation in
this driver has returns 'netdev_tx_t' value, and change the function
return type to netdev_tx_t.

Found by coccinelle.
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent efe22c12
...@@ -2027,7 +2027,7 @@ static void ehea_xmit3(struct sk_buff *skb, struct net_device *dev, ...@@ -2027,7 +2027,7 @@ static void ehea_xmit3(struct sk_buff *skb, struct net_device *dev,
dev_consume_skb_any(skb); dev_consume_skb_any(skb);
} }
static int ehea_start_xmit(struct sk_buff *skb, struct net_device *dev) static netdev_tx_t ehea_start_xmit(struct sk_buff *skb, struct net_device *dev)
{ {
struct ehea_port *port = netdev_priv(dev); struct ehea_port *port = netdev_priv(dev);
struct ehea_swqe *swqe; struct ehea_swqe *swqe;
......
...@@ -1409,7 +1409,7 @@ static inline u16 emac_tx_csum(struct emac_instance *dev, ...@@ -1409,7 +1409,7 @@ static inline u16 emac_tx_csum(struct emac_instance *dev,
return 0; return 0;
} }
static inline int emac_xmit_finish(struct emac_instance *dev, int len) static inline netdev_tx_t emac_xmit_finish(struct emac_instance *dev, int len)
{ {
struct emac_regs __iomem *p = dev->emacp; struct emac_regs __iomem *p = dev->emacp;
struct net_device *ndev = dev->ndev; struct net_device *ndev = dev->ndev;
...@@ -1436,7 +1436,7 @@ static inline int emac_xmit_finish(struct emac_instance *dev, int len) ...@@ -1436,7 +1436,7 @@ static inline int emac_xmit_finish(struct emac_instance *dev, int len)
} }
/* Tx lock BH */ /* Tx lock BH */
static int emac_start_xmit(struct sk_buff *skb, struct net_device *ndev) static netdev_tx_t emac_start_xmit(struct sk_buff *skb, struct net_device *ndev)
{ {
struct emac_instance *dev = netdev_priv(ndev); struct emac_instance *dev = netdev_priv(ndev);
unsigned int len = skb->len; unsigned int len = skb->len;
...@@ -1494,7 +1494,8 @@ static inline int emac_xmit_split(struct emac_instance *dev, int slot, ...@@ -1494,7 +1494,8 @@ static inline int emac_xmit_split(struct emac_instance *dev, int slot,
} }
/* Tx lock BH disabled (SG version for TAH equipped EMACs) */ /* Tx lock BH disabled (SG version for TAH equipped EMACs) */
static int emac_start_xmit_sg(struct sk_buff *skb, struct net_device *ndev) static netdev_tx_t
emac_start_xmit_sg(struct sk_buff *skb, struct net_device *ndev)
{ {
struct emac_instance *dev = netdev_priv(ndev); struct emac_instance *dev = netdev_priv(ndev);
int nr_frags = skb_shinfo(skb)->nr_frags; int nr_frags = skb_shinfo(skb)->nr_frags;
......
...@@ -1420,7 +1420,7 @@ static int ibmvnic_xmit_workarounds(struct sk_buff *skb, ...@@ -1420,7 +1420,7 @@ static int ibmvnic_xmit_workarounds(struct sk_buff *skb,
return 0; return 0;
} }
static int ibmvnic_xmit(struct sk_buff *skb, struct net_device *netdev) static netdev_tx_t ibmvnic_xmit(struct sk_buff *skb, struct net_device *netdev)
{ {
struct ibmvnic_adapter *adapter = netdev_priv(netdev); struct ibmvnic_adapter *adapter = netdev_priv(netdev);
int queue_num = skb_get_queue_mapping(skb); int queue_num = skb_get_queue_mapping(skb);
...@@ -1444,7 +1444,7 @@ static int ibmvnic_xmit(struct sk_buff *skb, struct net_device *netdev) ...@@ -1444,7 +1444,7 @@ static int ibmvnic_xmit(struct sk_buff *skb, struct net_device *netdev)
u64 *handle_array; u64 *handle_array;
int index = 0; int index = 0;
u8 proto = 0; u8 proto = 0;
int ret = 0; netdev_tx_t ret = NETDEV_TX_OK;
if (adapter->resetting) { if (adapter->resetting) {
if (!netif_subqueue_stopped(netdev, skb)) if (!netif_subqueue_stopped(netdev, skb))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment