Skip to content

Commit

Permalink
netpoll: convert several functions to bool
Browse files Browse the repository at this point in the history
These functions are just boolean, let them return
bool instead of int.

Cc: David Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <amwang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Amerigo Wang authored and David S. Miller committed Aug 14, 2012
1 parent e15c3c2 commit 77ab8a5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions include/linux/netpoll.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ static inline void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb)


#ifdef CONFIG_NETPOLL
static inline int netpoll_rx_on(struct sk_buff *skb)
static inline bool netpoll_rx_on(struct sk_buff *skb)
{
struct netpoll_info *npinfo = rcu_dereference_bh(skb->dev->npinfo);

Expand Down Expand Up @@ -125,19 +125,19 @@ static inline void netpoll_poll_unlock(void *have)
}
}

static inline int netpoll_tx_running(struct net_device *dev)
static inline bool netpoll_tx_running(struct net_device *dev)
{
return irqs_disabled();
}

#else
static inline bool netpoll_rx(struct sk_buff *skb)
{
return 0;
return false;
}
static inline int netpoll_rx_on(struct sk_buff *skb)
static inline bool netpoll_rx_on(struct sk_buff *skb)
{
return 0;
return false;
}
static inline int netpoll_receive_skb(struct sk_buff *skb)
{
Expand All @@ -153,9 +153,9 @@ static inline void netpoll_poll_unlock(void *have)
static inline void netpoll_netdev_init(struct net_device *dev)
{
}
static inline int netpoll_tx_running(struct net_device *dev)
static inline bool netpoll_tx_running(struct net_device *dev)
{
return 0;
return false;
}
#endif

Expand Down

0 comments on commit 77ab8a5

Please sign in to comment.