net: hns3: fix return type of ndo_start_xmit function
authorYueHaibing <yuehaibing@huawei.com>
Tue, 18 Sep 2018 06:09:43 +0000 (14:09 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Sep 2018 03:01:25 +0000 (20:01 -0700)
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
which is a typedef for an enum type, also the implementation in this
driver has returns 'netdev_tx_t' value, so just change the function
return type to netdev_tx_t.

Found by coccinelle.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hip04_eth.c
drivers/net/ethernet/hisilicon/hix5hd2_gmac.c

index 14374a856d3091a9489e92669c7d93e3e797a115..be268dcde8fa2a5db3fd392237d583a4c5cc0d5e 100644 (file)
@@ -422,7 +422,8 @@ static void hip04_start_tx_timer(struct hip04_priv *priv)
                               ns, HRTIMER_MODE_REL);
 }
 
-static int hip04_mac_start_xmit(struct sk_buff *skb, struct net_device *ndev)
+static netdev_tx_t
+hip04_mac_start_xmit(struct sk_buff *skb, struct net_device *ndev)
 {
        struct hip04_priv *priv = netdev_priv(ndev);
        struct net_device_stats *stats = &ndev->stats;
index c5727003af8c1438f9e4824b16f8774b8a383878..471805ea363b6b5eda58800b7ef0e5417e1d5530 100644 (file)
@@ -736,7 +736,7 @@ static int hix5hd2_fill_sg_desc(struct hix5hd2_priv *priv,
        return 0;
 }
 
-static int hix5hd2_net_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t hix5hd2_net_xmit(struct sk_buff *skb, struct net_device *dev)
 {
        struct hix5hd2_priv *priv = netdev_priv(dev);
        struct hix5hd2_desc *desc;