net: emac: Fix use correct return type for ndo_start_xmit()
authorYunjian Wang <wangyunjian@huawei.com>
Tue, 5 May 2020 05:57:49 +0000 (13:57 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 May 2020 18:20:23 +0000 (11:20 -0700)
The method ndo_start_xmit() returns a value of type netdev_tx_t. Fix
the ndo function to use the correct type.

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qualcomm/emac/emac-mac.c
drivers/net/ethernet/qualcomm/emac/emac-mac.h
drivers/net/ethernet/qualcomm/emac/emac.c

index 251d4ac4af02d348250935e4b1b4296933dc9ad7..117188e3c7de22bfdc2bc011095fca4ac65f8761 100644 (file)
@@ -1431,8 +1431,9 @@ error:
 }
 
 /* Transmit the packet using specified transmit queue */
-int emac_mac_tx_buf_send(struct emac_adapter *adpt, struct emac_tx_queue *tx_q,
-                        struct sk_buff *skb)
+netdev_tx_t emac_mac_tx_buf_send(struct emac_adapter *adpt,
+                                struct emac_tx_queue *tx_q,
+                                struct sk_buff *skb)
 {
        struct emac_tpd tpd;
        u32 prod_idx;
index ae08bdd9046c3b17c78921f52515356b41868178..920123eb8aced544bc227b5fcc3187a9ddf67b1c 100644 (file)
@@ -227,8 +227,9 @@ void emac_mac_stop(struct emac_adapter *adpt);
 void emac_mac_mode_config(struct emac_adapter *adpt);
 void emac_mac_rx_process(struct emac_adapter *adpt, struct emac_rx_queue *rx_q,
                         int *num_pkts, int max_pkts);
-int emac_mac_tx_buf_send(struct emac_adapter *adpt, struct emac_tx_queue *tx_q,
-                        struct sk_buff *skb);
+netdev_tx_t emac_mac_tx_buf_send(struct emac_adapter *adpt,
+                                struct emac_tx_queue *tx_q,
+                                struct sk_buff *skb);
 void emac_mac_tx_process(struct emac_adapter *adpt, struct emac_tx_queue *tx_q);
 void emac_mac_rx_tx_ring_init_all(struct platform_device *pdev,
                                  struct emac_adapter *adpt);
index 18b0c7a2d6dcb0b205f30af89a8186a867a7d233..20b1b43a0e3930a1f2769881f86baf2c645ac912 100644 (file)
@@ -115,7 +115,8 @@ static int emac_napi_rtx(struct napi_struct *napi, int budget)
 }
 
 /* Transmit the packet */
-static int emac_start_xmit(struct sk_buff *skb, struct net_device *netdev)
+static netdev_tx_t emac_start_xmit(struct sk_buff *skb,
+                                  struct net_device *netdev)
 {
        struct emac_adapter *adpt = netdev_priv(netdev);