]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
net: sun: fix return type of ndo_start_xmit function
authorYueHaibing <yuehaibing@huawei.com>
Wed, 19 Sep 2018 11:21:32 +0000 (19:21 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 Sep 2018 04:17:58 +0000 (21:17 -0700)
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>
drivers/net/ethernet/sun/ldmvsw.c
drivers/net/ethernet/sun/sunbmac.c
drivers/net/ethernet/sun/sunqe.c
drivers/net/ethernet/sun/sunvnet.c
drivers/net/ethernet/sun/sunvnet_common.c
drivers/net/ethernet/sun/sunvnet_common.h

index d42f47f6c632fe8618348d40fc609bfed5deef4a..644e42c181ee6030dee0222479daf314a290a1f5 100644 (file)
@@ -113,7 +113,7 @@ static u16 vsw_select_queue(struct net_device *dev, struct sk_buff *skb,
 }
 
 /* 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);
 }
index f047b27971564ec06f59810a8092c5d068503edb..720b7ac77f3b3c08e428faaf16ba4cbae1b76275 100644 (file)
@@ -950,7 +950,8 @@ static void bigmac_tx_timeout(struct net_device *dev)
 }
 
 /* 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);
        int len, entry;
index 7fe0d5e3392218ebea76ff524142a857e6b5e003..1468fa0a54e9b755884f808a3cd772b610a62b84 100644 (file)
@@ -570,7 +570,7 @@ out:
 }
 
 /* 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_buffers *qbufs = qep->buffers;
index 12539b357a78402dfc80a4a654761051a2fa6409..590172818b922f069a82765ff5042cd852093c27 100644 (file)
@@ -247,7 +247,7 @@ static u16 vnet_select_queue(struct net_device *dev, struct sk_buff *skb,
 }
 
 /* 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);
 }
index d8f4c3f281505810620a3c2f03a22bb657a8cb2f..baa3088b475c758f3cbcf17bdf7cb0e222ba2caf 100644 (file)
@@ -1216,9 +1216,10 @@ static inline struct sk_buff *vnet_skb_shape(struct sk_buff *skb, int ncookies)
        return skb;
 }
 
-static int vnet_handle_offloads(struct vnet_port *port, struct sk_buff *skb,
-                               struct vnet_port *(*vnet_tx_port)
-                               (struct sk_buff *, struct net_device *))
+static netdev_tx_t
+vnet_handle_offloads(struct vnet_port *port, struct sk_buff *skb,
+                    struct vnet_port *(*vnet_tx_port)
+                    (struct sk_buff *, struct net_device *))
 {
        struct net_device *dev = VNET_PORT_TO_NET_DEVICE(port);
        struct vio_dring_state *dr = &port->vio.drings[VIO_DRIVER_TX_RING];
@@ -1321,9 +1322,10 @@ out_dropped:
        return NETDEV_TX_OK;
 }
 
-int sunvnet_start_xmit_common(struct sk_buff *skb, struct net_device *dev,
-                             struct vnet_port *(*vnet_tx_port)
-                             (struct sk_buff *, struct net_device *))
+netdev_tx_t
+sunvnet_start_xmit_common(struct sk_buff *skb, struct net_device *dev,
+                         struct vnet_port *(*vnet_tx_port)
+                         (struct sk_buff *, struct net_device *))
 {
        struct vnet_port *port = NULL;
        struct vio_dring_state *dr;
index 1ea0b016580a40a904b0da23cc49f7c2a159e75e..2b808d2482d60e740176b0bb9007cc8bef747e82 100644 (file)
@@ -136,9 +136,10 @@ int sunvnet_close_common(struct net_device *dev);
 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);
 void sunvnet_tx_timeout_common(struct net_device *dev);
-int sunvnet_start_xmit_common(struct sk_buff *skb, struct net_device *dev,
-                          struct vnet_port *(*vnet_tx_port)
-                          (struct sk_buff *, struct net_device *));
+netdev_tx_t
+sunvnet_start_xmit_common(struct sk_buff *skb, struct net_device *dev,
+                         struct vnet_port *(*vnet_tx_port)
+                         (struct sk_buff *, struct net_device *));
 #ifdef CONFIG_NET_POLL_CONTROLLER
 void sunvnet_poll_controller_common(struct net_device *dev, struct vnet *vp);
 #endif