Skip to content

Commit e6ce382

Browse files
YueHaibingdavem330
authored andcommitted
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>
1 parent 648c361 commit e6ce382

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

drivers/net/ethernet/apple/bmac.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ static irqreturn_t bmac_txdma_intr(int irq, void *dev_id);
154154
static irqreturn_t bmac_rxdma_intr(int irq, void *dev_id);
155155
static void bmac_set_timeout(struct net_device *dev);
156156
static void bmac_tx_timeout(struct timer_list *t);
157-
static int bmac_output(struct sk_buff *skb, struct net_device *dev);
157+
static netdev_tx_t bmac_output(struct sk_buff *skb, struct net_device *dev);
158158
static void bmac_start(struct net_device *dev);
159159

160160
#define DBDMA_SET(x) ( ((x) | (x) << 16) )
@@ -1456,7 +1456,7 @@ bmac_start(struct net_device *dev)
14561456
spin_unlock_irqrestore(&bp->lock, flags);
14571457
}
14581458

1459-
static int
1459+
static netdev_tx_t
14601460
bmac_output(struct sk_buff *skb, struct net_device *dev)
14611461
{
14621462
struct bmac_data *bp = netdev_priv(dev);

drivers/net/ethernet/apple/mace.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ struct mace_data {
7878

7979
static int mace_open(struct net_device *dev);
8080
static int mace_close(struct net_device *dev);
81-
static int mace_xmit_start(struct sk_buff *skb, struct net_device *dev);
81+
static netdev_tx_t mace_xmit_start(struct sk_buff *skb, struct net_device *dev);
8282
static void mace_set_multicast(struct net_device *dev);
8383
static void mace_reset(struct net_device *dev);
8484
static int mace_set_address(struct net_device *dev, void *addr);
@@ -525,7 +525,7 @@ static inline void mace_set_timeout(struct net_device *dev)
525525
mp->timeout_active = 1;
526526
}
527527

528-
static int mace_xmit_start(struct sk_buff *skb, struct net_device *dev)
528+
static netdev_tx_t mace_xmit_start(struct sk_buff *skb, struct net_device *dev)
529529
{
530530
struct mace_data *mp = netdev_priv(dev);
531531
volatile struct dbdma_regs __iomem *td = mp->tx_dma;

drivers/net/ethernet/apple/macmace.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ struct mace_frame {
8989

9090
static int mace_open(struct net_device *dev);
9191
static int mace_close(struct net_device *dev);
92-
static int mace_xmit_start(struct sk_buff *skb, struct net_device *dev);
92+
static netdev_tx_t mace_xmit_start(struct sk_buff *skb, struct net_device *dev);
9393
static void mace_set_multicast(struct net_device *dev);
9494
static int mace_set_address(struct net_device *dev, void *addr);
9595
static void mace_reset(struct net_device *dev);
@@ -444,7 +444,7 @@ static int mace_close(struct net_device *dev)
444444
* Transmit a frame
445445
*/
446446

447-
static int mace_xmit_start(struct sk_buff *skb, struct net_device *dev)
447+
static netdev_tx_t mace_xmit_start(struct sk_buff *skb, struct net_device *dev)
448448
{
449449
struct mace_data *mp = netdev_priv(dev);
450450
unsigned long flags;

0 commit comments

Comments
 (0)