aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2018-09-20 23:46:37 -0400
committerDavid S. Miller <davem@davemloft.net>2018-09-21 22:15:15 -0400
commite6ce3822a9f264b3f24c1acdc624131fb014f2f0 (patch)
tree53b0ea7fde6f99ee72ea409b16167bca1a67e219
parent648c361a568dcd098a3496c6c66bca4c8473e52b (diff)
net: apple: 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, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and 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>
-rw-r--r--drivers/net/ethernet/apple/bmac.c4
-rw-r--r--drivers/net/ethernet/apple/mace.c4
-rw-r--r--drivers/net/ethernet/apple/macmace.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/ethernet/apple/bmac.c b/drivers/net/ethernet/apple/bmac.c
index 024998d6d8c6..6a8e2567f2bd 100644
--- a/drivers/net/ethernet/apple/bmac.c
+++ b/drivers/net/ethernet/apple/bmac.c
@@ -154,7 +154,7 @@ static irqreturn_t bmac_txdma_intr(int irq, void *dev_id);
154static irqreturn_t bmac_rxdma_intr(int irq, void *dev_id); 154static irqreturn_t bmac_rxdma_intr(int irq, void *dev_id);
155static void bmac_set_timeout(struct net_device *dev); 155static void bmac_set_timeout(struct net_device *dev);
156static void bmac_tx_timeout(struct timer_list *t); 156static void bmac_tx_timeout(struct timer_list *t);
157static int bmac_output(struct sk_buff *skb, struct net_device *dev); 157static netdev_tx_t bmac_output(struct sk_buff *skb, struct net_device *dev);
158static void bmac_start(struct net_device *dev); 158static void bmac_start(struct net_device *dev);
159 159
160#define DBDMA_SET(x) ( ((x) | (x) << 16) ) 160#define DBDMA_SET(x) ( ((x) | (x) << 16) )
@@ -1456,7 +1456,7 @@ bmac_start(struct net_device *dev)
1456 spin_unlock_irqrestore(&bp->lock, flags); 1456 spin_unlock_irqrestore(&bp->lock, flags);
1457} 1457}
1458 1458
1459static int 1459static netdev_tx_t
1460bmac_output(struct sk_buff *skb, struct net_device *dev) 1460bmac_output(struct sk_buff *skb, struct net_device *dev)
1461{ 1461{
1462 struct bmac_data *bp = netdev_priv(dev); 1462 struct bmac_data *bp = netdev_priv(dev);
diff --git a/drivers/net/ethernet/apple/mace.c b/drivers/net/ethernet/apple/mace.c
index 0b5429d76bcf..68b9ee489489 100644
--- a/drivers/net/ethernet/apple/mace.c
+++ b/drivers/net/ethernet/apple/mace.c
@@ -78,7 +78,7 @@ struct mace_data {
78 78
79static int mace_open(struct net_device *dev); 79static int mace_open(struct net_device *dev);
80static int mace_close(struct net_device *dev); 80static int mace_close(struct net_device *dev);
81static int mace_xmit_start(struct sk_buff *skb, struct net_device *dev); 81static netdev_tx_t mace_xmit_start(struct sk_buff *skb, struct net_device *dev);
82static void mace_set_multicast(struct net_device *dev); 82static void mace_set_multicast(struct net_device *dev);
83static void mace_reset(struct net_device *dev); 83static void mace_reset(struct net_device *dev);
84static int mace_set_address(struct net_device *dev, void *addr); 84static int mace_set_address(struct net_device *dev, void *addr);
@@ -525,7 +525,7 @@ static inline void mace_set_timeout(struct net_device *dev)
525 mp->timeout_active = 1; 525 mp->timeout_active = 1;
526} 526}
527 527
528static int mace_xmit_start(struct sk_buff *skb, struct net_device *dev) 528static netdev_tx_t mace_xmit_start(struct sk_buff *skb, struct net_device *dev)
529{ 529{
530 struct mace_data *mp = netdev_priv(dev); 530 struct mace_data *mp = netdev_priv(dev);
531 volatile struct dbdma_regs __iomem *td = mp->tx_dma; 531 volatile struct dbdma_regs __iomem *td = mp->tx_dma;
diff --git a/drivers/net/ethernet/apple/macmace.c b/drivers/net/ethernet/apple/macmace.c
index 137cbb470af2..376f2c2613e7 100644
--- a/drivers/net/ethernet/apple/macmace.c
+++ b/drivers/net/ethernet/apple/macmace.c
@@ -89,7 +89,7 @@ struct mace_frame {
89 89
90static int mace_open(struct net_device *dev); 90static int mace_open(struct net_device *dev);
91static int mace_close(struct net_device *dev); 91static int mace_close(struct net_device *dev);
92static int mace_xmit_start(struct sk_buff *skb, struct net_device *dev); 92static netdev_tx_t mace_xmit_start(struct sk_buff *skb, struct net_device *dev);
93static void mace_set_multicast(struct net_device *dev); 93static void mace_set_multicast(struct net_device *dev);
94static int mace_set_address(struct net_device *dev, void *addr); 94static int mace_set_address(struct net_device *dev, void *addr);
95static void mace_reset(struct net_device *dev); 95static void mace_reset(struct net_device *dev);
@@ -444,7 +444,7 @@ static int mace_close(struct net_device *dev)
444 * Transmit a frame 444 * Transmit a frame
445 */ 445 */
446 446
447static int mace_xmit_start(struct sk_buff *skb, struct net_device *dev) 447static netdev_tx_t mace_xmit_start(struct sk_buff *skb, struct net_device *dev)
448{ 448{
449 struct mace_data *mp = netdev_priv(dev); 449 struct mace_data *mp = netdev_priv(dev);
450 unsigned long flags; 450 unsigned long flags;