Commit 0e0cc31f authored by YueHaibing's avatar YueHaibing Committed by David S. Miller

net: sun: fix return type of ndo_start_xmit function

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

Found by coccinelle.
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Acked-by: default avatarShannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fe72352e
...@@ -113,7 +113,7 @@ static u16 vsw_select_queue(struct net_device *dev, struct sk_buff *skb, ...@@ -113,7 +113,7 @@ static u16 vsw_select_queue(struct net_device *dev, struct sk_buff *skb,
} }
/* Wrappers to common functions */ /* Wrappers to common functions */
static int vsw_start_xmit(struct sk_buff *skb, struct net_device *dev) static netdev_tx_t vsw_start_xmit(struct sk_buff *skb, struct net_device *dev)
{ {
return sunvnet_start_xmit_common(skb, dev, vsw_tx_port_find); return sunvnet_start_xmit_common(skb, dev, vsw_tx_port_find);
} }
......
...@@ -950,7 +950,8 @@ static void bigmac_tx_timeout(struct net_device *dev) ...@@ -950,7 +950,8 @@ static void bigmac_tx_timeout(struct net_device *dev)
} }
/* Put a packet on the wire. */ /* Put a packet on the wire. */
static int bigmac_start_xmit(struct sk_buff *skb, struct net_device *dev) static netdev_tx_t
bigmac_start_xmit(struct sk_buff *skb, struct net_device *dev)
{ {
struct bigmac *bp = netdev_priv(dev); struct bigmac *bp = netdev_priv(dev);
int len, entry; int len, entry;
......
...@@ -570,7 +570,7 @@ static void qe_tx_timeout(struct net_device *dev) ...@@ -570,7 +570,7 @@ static void qe_tx_timeout(struct net_device *dev)
} }
/* Get a packet queued to go onto the wire. */ /* Get a packet queued to go onto the wire. */
static int qe_start_xmit(struct sk_buff *skb, struct net_device *dev) static netdev_tx_t qe_start_xmit(struct sk_buff *skb, struct net_device *dev)
{ {
struct sunqe *qep = netdev_priv(dev); struct sunqe *qep = netdev_priv(dev);
struct sunqe_buffers *qbufs = qep->buffers; struct sunqe_buffers *qbufs = qep->buffers;
......
...@@ -247,7 +247,7 @@ static u16 vnet_select_queue(struct net_device *dev, struct sk_buff *skb, ...@@ -247,7 +247,7 @@ static u16 vnet_select_queue(struct net_device *dev, struct sk_buff *skb,
} }
/* Wrappers to common functions */ /* Wrappers to common functions */
static int vnet_start_xmit(struct sk_buff *skb, struct net_device *dev) static netdev_tx_t vnet_start_xmit(struct sk_buff *skb, struct net_device *dev)
{ {
return sunvnet_start_xmit_common(skb, dev, vnet_tx_port_find); return sunvnet_start_xmit_common(skb, dev, vnet_tx_port_find);
} }
......
...@@ -1216,7 +1216,8 @@ static inline struct sk_buff *vnet_skb_shape(struct sk_buff *skb, int ncookies) ...@@ -1216,7 +1216,8 @@ static inline struct sk_buff *vnet_skb_shape(struct sk_buff *skb, int ncookies)
return skb; return skb;
} }
static int vnet_handle_offloads(struct vnet_port *port, struct sk_buff *skb, static netdev_tx_t
vnet_handle_offloads(struct vnet_port *port, struct sk_buff *skb,
struct vnet_port *(*vnet_tx_port) struct vnet_port *(*vnet_tx_port)
(struct sk_buff *, struct net_device *)) (struct sk_buff *, struct net_device *))
{ {
...@@ -1321,7 +1322,8 @@ static int vnet_handle_offloads(struct vnet_port *port, struct sk_buff *skb, ...@@ -1321,7 +1322,8 @@ static int vnet_handle_offloads(struct vnet_port *port, struct sk_buff *skb,
return NETDEV_TX_OK; return NETDEV_TX_OK;
} }
int sunvnet_start_xmit_common(struct sk_buff *skb, struct net_device *dev, netdev_tx_t
sunvnet_start_xmit_common(struct sk_buff *skb, struct net_device *dev,
struct vnet_port *(*vnet_tx_port) struct vnet_port *(*vnet_tx_port)
(struct sk_buff *, struct net_device *)) (struct sk_buff *, struct net_device *))
{ {
......
...@@ -136,7 +136,8 @@ int sunvnet_close_common(struct net_device *dev); ...@@ -136,7 +136,8 @@ int sunvnet_close_common(struct net_device *dev);
void sunvnet_set_rx_mode_common(struct net_device *dev, struct vnet *vp); void sunvnet_set_rx_mode_common(struct net_device *dev, struct vnet *vp);
int sunvnet_set_mac_addr_common(struct net_device *dev, void *p); int sunvnet_set_mac_addr_common(struct net_device *dev, void *p);
void sunvnet_tx_timeout_common(struct net_device *dev); void sunvnet_tx_timeout_common(struct net_device *dev);
int sunvnet_start_xmit_common(struct sk_buff *skb, struct net_device *dev, netdev_tx_t
sunvnet_start_xmit_common(struct sk_buff *skb, struct net_device *dev,
struct vnet_port *(*vnet_tx_port) struct vnet_port *(*vnet_tx_port)
(struct sk_buff *, struct net_device *)); (struct sk_buff *, struct net_device *));
#ifdef CONFIG_NET_POLL_CONTROLLER #ifdef CONFIG_NET_POLL_CONTROLLER
......
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