Commit 63a0e051 authored by YueHaibing's avatar YueHaibing Committed by Greg Kroah-Hartman

net: xilinx: fix return type of ndo_start_xmit function

[ Upstream commit 81255af8 ]

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 df9f5c79
...@@ -674,7 +674,8 @@ static inline int temac_check_tx_bd_space(struct temac_local *lp, int num_frag) ...@@ -674,7 +674,8 @@ static inline int temac_check_tx_bd_space(struct temac_local *lp, int num_frag)
return 0; return 0;
} }
static int temac_start_xmit(struct sk_buff *skb, struct net_device *ndev) static netdev_tx_t
temac_start_xmit(struct sk_buff *skb, struct net_device *ndev)
{ {
struct temac_local *lp = netdev_priv(ndev); struct temac_local *lp = netdev_priv(ndev);
struct cdmac_bd *cur_p; struct cdmac_bd *cur_p;
......
...@@ -657,7 +657,8 @@ static inline int axienet_check_tx_bd_space(struct axienet_local *lp, ...@@ -657,7 +657,8 @@ static inline int axienet_check_tx_bd_space(struct axienet_local *lp,
* start the transmission. Additionally if checksum offloading is supported, * start the transmission. Additionally if checksum offloading is supported,
* it populates AXI Stream Control fields with appropriate values. * it populates AXI Stream Control fields with appropriate values.
*/ */
static int axienet_start_xmit(struct sk_buff *skb, struct net_device *ndev) static netdev_tx_t
axienet_start_xmit(struct sk_buff *skb, struct net_device *ndev)
{ {
u32 ii; u32 ii;
u32 num_frag; u32 num_frag;
......
...@@ -1020,9 +1020,10 @@ static int xemaclite_close(struct net_device *dev) ...@@ -1020,9 +1020,10 @@ static int xemaclite_close(struct net_device *dev)
* deferred and the Tx queue is stopped so that the deferred socket buffer can * deferred and the Tx queue is stopped so that the deferred socket buffer can
* be transmitted when the Emaclite device is free to transmit data. * be transmitted when the Emaclite device is free to transmit data.
* *
* Return: 0, always. * Return: NETDEV_TX_OK, always.
*/ */
static int xemaclite_send(struct sk_buff *orig_skb, struct net_device *dev) static netdev_tx_t
xemaclite_send(struct sk_buff *orig_skb, struct net_device *dev)
{ {
struct net_local *lp = netdev_priv(dev); struct net_local *lp = netdev_priv(dev);
struct sk_buff *new_skb; struct sk_buff *new_skb;
...@@ -1044,7 +1045,7 @@ static int xemaclite_send(struct sk_buff *orig_skb, struct net_device *dev) ...@@ -1044,7 +1045,7 @@ static int xemaclite_send(struct sk_buff *orig_skb, struct net_device *dev)
/* Take the time stamp now, since we can't do this in an ISR. */ /* Take the time stamp now, since we can't do this in an ISR. */
skb_tx_timestamp(new_skb); skb_tx_timestamp(new_skb);
spin_unlock_irqrestore(&lp->reset_lock, flags); spin_unlock_irqrestore(&lp->reset_lock, flags);
return 0; return NETDEV_TX_OK;
} }
spin_unlock_irqrestore(&lp->reset_lock, flags); spin_unlock_irqrestore(&lp->reset_lock, flags);
...@@ -1053,7 +1054,7 @@ static int xemaclite_send(struct sk_buff *orig_skb, struct net_device *dev) ...@@ -1053,7 +1054,7 @@ static int xemaclite_send(struct sk_buff *orig_skb, struct net_device *dev)
dev->stats.tx_bytes += len; dev->stats.tx_bytes += len;
dev_consume_skb_any(new_skb); dev_consume_skb_any(new_skb);
return 0; return NETDEV_TX_OK;
} }
/** /**
......
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