Skip to content

Commit f3bf939

Browse files
YueHaibingdavem330
authored andcommitted
net: cirrus: 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 72b4627 commit f3bf939

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

drivers/net/ethernet/cirrus/ep93xx_eth.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ static int ep93xx_poll(struct napi_struct *napi, int budget)
332332
return rx;
333333
}
334334

335-
static int ep93xx_xmit(struct sk_buff *skb, struct net_device *dev)
335+
static netdev_tx_t ep93xx_xmit(struct sk_buff *skb, struct net_device *dev)
336336
{
337337
struct ep93xx_priv *ep = netdev_priv(dev);
338338
struct ep93xx_tdesc *txd;

drivers/net/ethernet/cirrus/mac89x0.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ struct net_local {
113113

114114
/* Index to functions, as function prototypes. */
115115
static int net_open(struct net_device *dev);
116-
static int net_send_packet(struct sk_buff *skb, struct net_device *dev);
116+
static netdev_tx_t net_send_packet(struct sk_buff *skb, struct net_device *dev);
117117
static irqreturn_t net_interrupt(int irq, void *dev_id);
118118
static void set_multicast_list(struct net_device *dev);
119119
static void net_rx(struct net_device *dev);
@@ -324,7 +324,7 @@ net_open(struct net_device *dev)
324324
return 0;
325325
}
326326

327-
static int
327+
static netdev_tx_t
328328
net_send_packet(struct sk_buff *skb, struct net_device *dev)
329329
{
330330
struct net_local *lp = netdev_priv(dev);

0 commit comments

Comments
 (0)