* [PATCH] netpoll: Use 'bool' for netpoll_rx() return type.
@ 2010-05-06 8:20 David Miller
2010-05-06 8:27 ` Changli Gao
0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2010-05-06 8:20 UTC (permalink / raw)
To: netdev
Signed-off-by: David S. Miller <davem@davemloft.net>
---
I noticed this while validating and auditing Eric Dumazet's vnet
fix... applied to net-next-2.6
include/linux/netpoll.h | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h
index 017e604..3688c83 100644
--- a/include/linux/netpoll.h
+++ b/include/linux/netpoll.h
@@ -55,19 +55,19 @@ void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb);
#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;
unsigned long flags;
- int ret = 0;
+ int ret = false;
if (!npinfo || (list_empty(&npinfo->rx_np) && !npinfo->rx_flags))
- return 0;
+ return false;
spin_lock_irqsave(&npinfo->rx_lock, flags);
/* check rx_flags again with the lock held */
if (npinfo->rx_flags && __netpoll_rx(skb))
- ret = 1;
+ ret = true;
spin_unlock_irqrestore(&npinfo->rx_lock, flags);
return ret;
--
1.7.0.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] netpoll: Use 'bool' for netpoll_rx() return type.
2010-05-06 8:20 [PATCH] netpoll: Use 'bool' for netpoll_rx() return type David Miller
@ 2010-05-06 8:27 ` Changli Gao
2010-05-06 8:30 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Changli Gao @ 2010-05-06 8:27 UTC (permalink / raw)
To: David Miller; +Cc: netdev
On Thu, May 6, 2010 at 4:20 PM, David Miller <davem@davemloft.net> wrote:
>
> Signed-off-by: David S. Miller <davem@davemloft.net>
> ---
>
> I noticed this while validating and auditing Eric Dumazet's vnet
> fix... applied to net-next-2.6
>
> include/linux/netpoll.h | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h
> index 017e604..3688c83 100644
> --- a/include/linux/netpoll.h
> +++ b/include/linux/netpoll.h
> @@ -55,19 +55,19 @@ void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb);
>
>
> #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;
> unsigned long flags;
> - int ret = 0;
> + int ret = false;
>
bool ret = false.
--
Regards,
Changli Gao(xiaosuo@gmail.com)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] netpoll: Use 'bool' for netpoll_rx() return type.
2010-05-06 8:27 ` Changli Gao
@ 2010-05-06 8:30 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2010-05-06 8:30 UTC (permalink / raw)
To: xiaosuo; +Cc: netdev
From: Changli Gao <xiaosuo@gmail.com>
Date: Thu, 6 May 2010 16:27:44 +0800
> bool ret = false.
Thanks for catching that, fixed.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-05-06 8:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-06 8:20 [PATCH] netpoll: Use 'bool' for netpoll_rx() return type David Miller
2010-05-06 8:27 ` Changli Gao
2010-05-06 8:30 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).