Skip to content

Commit 77ab8a5

Browse files
Amerigo Wangdavem330
authored andcommitted
netpoll: convert several functions to bool
These functions are just boolean, let them return bool instead of int. Cc: David Miller <[email protected]> Signed-off-by: Cong Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent e15c3c2 commit 77ab8a5

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

include/linux/netpoll.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ static inline void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb)
6666

6767

6868
#ifdef CONFIG_NETPOLL
69-
static inline int netpoll_rx_on(struct sk_buff *skb)
69+
static inline bool netpoll_rx_on(struct sk_buff *skb)
7070
{
7171
struct netpoll_info *npinfo = rcu_dereference_bh(skb->dev->npinfo);
7272

@@ -125,19 +125,19 @@ static inline void netpoll_poll_unlock(void *have)
125125
}
126126
}
127127

128-
static inline int netpoll_tx_running(struct net_device *dev)
128+
static inline bool netpoll_tx_running(struct net_device *dev)
129129
{
130130
return irqs_disabled();
131131
}
132132

133133
#else
134134
static inline bool netpoll_rx(struct sk_buff *skb)
135135
{
136-
return 0;
136+
return false;
137137
}
138-
static inline int netpoll_rx_on(struct sk_buff *skb)
138+
static inline bool netpoll_rx_on(struct sk_buff *skb)
139139
{
140-
return 0;
140+
return false;
141141
}
142142
static inline int netpoll_receive_skb(struct sk_buff *skb)
143143
{
@@ -153,9 +153,9 @@ static inline void netpoll_poll_unlock(void *have)
153153
static inline void netpoll_netdev_init(struct net_device *dev)
154154
{
155155
}
156-
static inline int netpoll_tx_running(struct net_device *dev)
156+
static inline bool netpoll_tx_running(struct net_device *dev)
157157
{
158-
return 0;
158+
return false;
159159
}
160160
#endif
161161

0 commit comments

Comments
 (0)