diff options
author | YueHaibing <yuehaibing@huawei.com> | 2018-09-19 07:21:32 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-09-20 00:17:58 -0400 |
commit | 0e0cc31f6999df18bb5cfd0bd83c892ed5633975 (patch) | |
tree | e204f30e6cf0ccf91b42695564cf0d60d4c70110 | |
parent | fe72352e37ae8478f4c97975a9831f0c50f22e73 (diff) |
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: YueHaibing <yuehaibing@huawei.com>
Acked-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/sun/ldmvsw.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/sun/sunbmac.c | 3 | ||||
-rw-r--r-- | drivers/net/ethernet/sun/sunqe.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/sun/sunvnet.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/sun/sunvnet_common.c | 14 | ||||
-rw-r--r-- | drivers/net/ethernet/sun/sunvnet_common.h | 7 |
6 files changed, 17 insertions, 13 deletions
diff --git a/drivers/net/ethernet/sun/ldmvsw.c b/drivers/net/ethernet/sun/ldmvsw.c index d42f47f6c632..644e42c181ee 100644 --- a/drivers/net/ethernet/sun/ldmvsw.c +++ b/drivers/net/ethernet/sun/ldmvsw.c | |||
@@ -113,7 +113,7 @@ static u16 vsw_select_queue(struct net_device *dev, struct sk_buff *skb, | |||
113 | } | 113 | } |
114 | 114 | ||
115 | /* Wrappers to common functions */ | 115 | /* Wrappers to common functions */ |
116 | static int vsw_start_xmit(struct sk_buff *skb, struct net_device *dev) | 116 | static netdev_tx_t vsw_start_xmit(struct sk_buff *skb, struct net_device *dev) |
117 | { | 117 | { |
118 | return sunvnet_start_xmit_common(skb, dev, vsw_tx_port_find); | 118 | return sunvnet_start_xmit_common(skb, dev, vsw_tx_port_find); |
119 | } | 119 | } |
diff --git a/drivers/net/ethernet/sun/sunbmac.c b/drivers/net/ethernet/sun/sunbmac.c index f047b2797156..720b7ac77f3b 100644 --- a/drivers/net/ethernet/sun/sunbmac.c +++ b/drivers/net/ethernet/sun/sunbmac.c | |||
@@ -950,7 +950,8 @@ static void bigmac_tx_timeout(struct net_device *dev) | |||
950 | } | 950 | } |
951 | 951 | ||
952 | /* Put a packet on the wire. */ | 952 | /* Put a packet on the wire. */ |
953 | static int bigmac_start_xmit(struct sk_buff *skb, struct net_device *dev) | 953 | static netdev_tx_t |
954 | bigmac_start_xmit(struct sk_buff *skb, struct net_device *dev) | ||
954 | { | 955 | { |
955 | struct bigmac *bp = netdev_priv(dev); | 956 | struct bigmac *bp = netdev_priv(dev); |
956 | int len, entry; | 957 | int len, entry; |
diff --git a/drivers/net/ethernet/sun/sunqe.c b/drivers/net/ethernet/sun/sunqe.c index 7fe0d5e33922..1468fa0a54e9 100644 --- a/drivers/net/ethernet/sun/sunqe.c +++ b/drivers/net/ethernet/sun/sunqe.c | |||
@@ -570,7 +570,7 @@ out: | |||
570 | } | 570 | } |
571 | 571 | ||
572 | /* Get a packet queued to go onto the wire. */ | 572 | /* Get a packet queued to go onto the wire. */ |
573 | static int qe_start_xmit(struct sk_buff *skb, struct net_device *dev) | 573 | static netdev_tx_t qe_start_xmit(struct sk_buff *skb, struct net_device *dev) |
574 | { | 574 | { |
575 | struct sunqe *qep = netdev_priv(dev); | 575 | struct sunqe *qep = netdev_priv(dev); |
576 | struct sunqe_buffers *qbufs = qep->buffers; | 576 | struct sunqe_buffers *qbufs = qep->buffers; |
diff --git a/drivers/net/ethernet/sun/sunvnet.c b/drivers/net/ethernet/sun/sunvnet.c index 12539b357a78..590172818b92 100644 --- a/drivers/net/ethernet/sun/sunvnet.c +++ b/drivers/net/ethernet/sun/sunvnet.c | |||
@@ -247,7 +247,7 @@ static u16 vnet_select_queue(struct net_device *dev, struct sk_buff *skb, | |||
247 | } | 247 | } |
248 | 248 | ||
249 | /* Wrappers to common functions */ | 249 | /* Wrappers to common functions */ |
250 | static int vnet_start_xmit(struct sk_buff *skb, struct net_device *dev) | 250 | static netdev_tx_t vnet_start_xmit(struct sk_buff *skb, struct net_device *dev) |
251 | { | 251 | { |
252 | return sunvnet_start_xmit_common(skb, dev, vnet_tx_port_find); | 252 | return sunvnet_start_xmit_common(skb, dev, vnet_tx_port_find); |
253 | } | 253 | } |
diff --git a/drivers/net/ethernet/sun/sunvnet_common.c b/drivers/net/ethernet/sun/sunvnet_common.c index d8f4c3f28150..baa3088b475c 100644 --- a/drivers/net/ethernet/sun/sunvnet_common.c +++ b/drivers/net/ethernet/sun/sunvnet_common.c | |||
@@ -1216,9 +1216,10 @@ static inline struct sk_buff *vnet_skb_shape(struct sk_buff *skb, int ncookies) | |||
1216 | return skb; | 1216 | return skb; |
1217 | } | 1217 | } |
1218 | 1218 | ||
1219 | static int vnet_handle_offloads(struct vnet_port *port, struct sk_buff *skb, | 1219 | static netdev_tx_t |
1220 | struct vnet_port *(*vnet_tx_port) | 1220 | vnet_handle_offloads(struct vnet_port *port, struct sk_buff *skb, |
1221 | (struct sk_buff *, struct net_device *)) | 1221 | struct vnet_port *(*vnet_tx_port) |
1222 | (struct sk_buff *, struct net_device *)) | ||
1222 | { | 1223 | { |
1223 | struct net_device *dev = VNET_PORT_TO_NET_DEVICE(port); | 1224 | struct net_device *dev = VNET_PORT_TO_NET_DEVICE(port); |
1224 | struct vio_dring_state *dr = &port->vio.drings[VIO_DRIVER_TX_RING]; | 1225 | struct vio_dring_state *dr = &port->vio.drings[VIO_DRIVER_TX_RING]; |
@@ -1321,9 +1322,10 @@ out_dropped: | |||
1321 | return NETDEV_TX_OK; | 1322 | return NETDEV_TX_OK; |
1322 | } | 1323 | } |
1323 | 1324 | ||
1324 | int sunvnet_start_xmit_common(struct sk_buff *skb, struct net_device *dev, | 1325 | netdev_tx_t |
1325 | struct vnet_port *(*vnet_tx_port) | 1326 | sunvnet_start_xmit_common(struct sk_buff *skb, struct net_device *dev, |
1326 | (struct sk_buff *, struct net_device *)) | 1327 | struct vnet_port *(*vnet_tx_port) |
1328 | (struct sk_buff *, struct net_device *)) | ||
1327 | { | 1329 | { |
1328 | struct vnet_port *port = NULL; | 1330 | struct vnet_port *port = NULL; |
1329 | struct vio_dring_state *dr; | 1331 | struct vio_dring_state *dr; |
diff --git a/drivers/net/ethernet/sun/sunvnet_common.h b/drivers/net/ethernet/sun/sunvnet_common.h index 1ea0b016580a..2b808d2482d6 100644 --- a/drivers/net/ethernet/sun/sunvnet_common.h +++ b/drivers/net/ethernet/sun/sunvnet_common.h | |||
@@ -136,9 +136,10 @@ int sunvnet_close_common(struct net_device *dev); | |||
136 | void sunvnet_set_rx_mode_common(struct net_device *dev, struct vnet *vp); | 136 | void sunvnet_set_rx_mode_common(struct net_device *dev, struct vnet *vp); |
137 | int sunvnet_set_mac_addr_common(struct net_device *dev, void *p); | 137 | int sunvnet_set_mac_addr_common(struct net_device *dev, void *p); |
138 | void sunvnet_tx_timeout_common(struct net_device *dev); | 138 | void sunvnet_tx_timeout_common(struct net_device *dev); |
139 | int sunvnet_start_xmit_common(struct sk_buff *skb, struct net_device *dev, | 139 | netdev_tx_t |
140 | struct vnet_port *(*vnet_tx_port) | 140 | sunvnet_start_xmit_common(struct sk_buff *skb, struct net_device *dev, |
141 | (struct sk_buff *, struct net_device *)); | 141 | struct vnet_port *(*vnet_tx_port) |
142 | (struct sk_buff *, struct net_device *)); | ||
142 | #ifdef CONFIG_NET_POLL_CONTROLLER | 143 | #ifdef CONFIG_NET_POLL_CONTROLLER |
143 | void sunvnet_poll_controller_common(struct net_device *dev, struct vnet *vp); | 144 | void sunvnet_poll_controller_common(struct net_device *dev, struct vnet *vp); |
144 | #endif | 145 | #endif |