Skip to content

Commit

Permalink
netpoll: Fix use correct return type for ndo_start_xmit()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yunjian Wang authored and David S. Miller committed Apr 29, 2020
1 parent 00b5aac commit a54776f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions net/core/netpoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,11 @@ module_param(carrier_timeout, uint, 0644);
#define np_notice(np, fmt, ...) \
pr_notice("%s: " fmt, np->name, ##__VA_ARGS__)

static int netpoll_start_xmit(struct sk_buff *skb, struct net_device *dev,
struct netdev_queue *txq)
static netdev_tx_t netpoll_start_xmit(struct sk_buff *skb,
struct net_device *dev,
struct netdev_queue *txq)
{
int status = NETDEV_TX_OK;
netdev_tx_t status = NETDEV_TX_OK;
netdev_features_t features;

features = netif_skb_features(skb);
Expand Down Expand Up @@ -307,7 +308,7 @@ static int netpoll_owner_active(struct net_device *dev)
void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
struct net_device *dev)
{
int status = NETDEV_TX_BUSY;
netdev_tx_t status = NETDEV_TX_BUSY;
unsigned long tries;
/* It is up to the caller to keep npinfo alive. */
struct netpoll_info *npinfo;
Expand Down

0 comments on commit a54776f

Please sign in to comment.