Commit ffb27362 authored by David S. Miller's avatar David S. Miller

netpoll: Use 'bool' for netpoll_rx() return type.

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f6dc31a8
...@@ -55,19 +55,19 @@ void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb); ...@@ -55,19 +55,19 @@ void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb);
#ifdef CONFIG_NETPOLL #ifdef CONFIG_NETPOLL
static inline int netpoll_rx(struct sk_buff *skb) static inline bool netpoll_rx(struct sk_buff *skb)
{ {
struct netpoll_info *npinfo = skb->dev->npinfo; struct netpoll_info *npinfo = skb->dev->npinfo;
unsigned long flags; unsigned long flags;
int ret = 0; bool ret = false;
if (!npinfo || (list_empty(&npinfo->rx_np) && !npinfo->rx_flags)) if (!npinfo || (list_empty(&npinfo->rx_np) && !npinfo->rx_flags))
return 0; return false;
spin_lock_irqsave(&npinfo->rx_lock, flags); spin_lock_irqsave(&npinfo->rx_lock, flags);
/* check rx_flags again with the lock held */ /* check rx_flags again with the lock held */
if (npinfo->rx_flags && __netpoll_rx(skb)) if (npinfo->rx_flags && __netpoll_rx(skb))
ret = 1; ret = true;
spin_unlock_irqrestore(&npinfo->rx_lock, flags); spin_unlock_irqrestore(&npinfo->rx_lock, flags);
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment