All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] netfilter: ipset: fix boolreturn.cocci warnings
       [not found] <201502112043.OvntWCjd%fengguang.wu@intel.com>
@ 2015-02-11 12:33 ` kbuild test robot
  2015-02-11 14:40   ` Pablo Neira Ayuso
  2015-03-11 19:08   ` Jozsef Kadlecsik
  0 siblings, 2 replies; 6+ messages in thread
From: kbuild test robot @ 2015-02-11 12:33 UTC (permalink / raw)
  To: Jozsef Kadlecsik
  Cc: kbuild-all, Pablo Neira Ayuso, Patrick McHardy, netfilter-devel,
	coreteam, netdev, linux-kernel

net/netfilter/xt_set.c:196:9-10: WARNING: return of 0/1 in function 'set_match_v3' with return type bool
net/netfilter/xt_set.c:242:9-10: WARNING: return of 0/1 in function 'set_match_v4' with return type bool

 Return statements in functions returning bool should use
 true/false instead of 1/0.
Generated by: scripts/coccinelle/misc/boolreturn.cocci

CC: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 xt_set.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/net/netfilter/xt_set.c
+++ b/net/netfilter/xt_set.c
@@ -193,7 +193,7 @@ set_match_v3(const struct sk_buff *skb,
 		return ret;
 
 	if (!match_counter0(opt.ext.packets, &info->packets))
-		return 0;
+		return false;
 	return match_counter0(opt.ext.bytes, &info->bytes);
 }
 
@@ -239,7 +239,7 @@ set_match_v4(const struct sk_buff *skb,
 		return ret;
 
 	if (!match_counter(opt.ext.packets, &info->packets))
-		return 0;
+		return false;
 	return match_counter(opt.ext.bytes, &info->bytes);
 }
 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] netfilter: ipset: fix boolreturn.cocci warnings
  2015-02-11 12:33 ` [PATCH] netfilter: ipset: fix boolreturn.cocci warnings kbuild test robot
@ 2015-02-11 14:40   ` Pablo Neira Ayuso
  2015-02-11 14:50     ` Jozsef Kadlecsik
  2015-03-11 19:08   ` Jozsef Kadlecsik
  1 sibling, 1 reply; 6+ messages in thread
From: Pablo Neira Ayuso @ 2015-02-11 14:40 UTC (permalink / raw)
  To: Jozsef Kadlecsik
  Cc: kbuild-all, kbuild test robot, Patrick McHardy, netfilter-devel,
	coreteam, netdev, linux-kernel

On Wed, Feb 11, 2015 at 08:33:05PM +0800, kbuild test robot wrote:
> net/netfilter/xt_set.c:196:9-10: WARNING: return of 0/1 in function 'set_match_v3' with return type bool
> net/netfilter/xt_set.c:242:9-10: WARNING: return of 0/1 in function 'set_match_v4' with return type bool
> 
>  Return statements in functions returning bool should use
>  true/false instead of 1/0.
> Generated by: scripts/coccinelle/misc/boolreturn.cocci

Jozsef, unless you have any objection, I'm going to apply this.

Thanks.

> CC: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> ---
> 
>  xt_set.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> --- a/net/netfilter/xt_set.c
> +++ b/net/netfilter/xt_set.c
> @@ -193,7 +193,7 @@ set_match_v3(const struct sk_buff *skb,
>  		return ret;
>  
>  	if (!match_counter0(opt.ext.packets, &info->packets))
> -		return 0;
> +		return false;
>  	return match_counter0(opt.ext.bytes, &info->bytes);
>  }
>  
> @@ -239,7 +239,7 @@ set_match_v4(const struct sk_buff *skb,
>  		return ret;
>  
>  	if (!match_counter(opt.ext.packets, &info->packets))
> -		return 0;
> +		return false;
>  	return match_counter(opt.ext.bytes, &info->bytes);
>  }
>  

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] netfilter: ipset: fix boolreturn.cocci warnings
  2015-02-11 14:40   ` Pablo Neira Ayuso
@ 2015-02-11 14:50     ` Jozsef Kadlecsik
  0 siblings, 0 replies; 6+ messages in thread
From: Jozsef Kadlecsik @ 2015-02-11 14:50 UTC (permalink / raw)
  To: Pablo Neira Ayuso
  Cc: kbuild-all, kbuild test robot, Patrick McHardy, netfilter-devel,
	coreteam, netdev, linux-kernel

On Wed, 11 Feb 2015, Pablo Neira Ayuso wrote:

> On Wed, Feb 11, 2015 at 08:33:05PM +0800, kbuild test robot wrote:
> > net/netfilter/xt_set.c:196:9-10: WARNING: return of 0/1 in function 'set_match_v3' with return type bool
> > net/netfilter/xt_set.c:242:9-10: WARNING: return of 0/1 in function 'set_match_v4' with return type bool
> > 
> >  Return statements in functions returning bool should use
> >  true/false instead of 1/0.
> > Generated by: scripts/coccinelle/misc/boolreturn.cocci
> 
> Jozsef, unless you have any objection, I'm going to apply this.

No objection, just go ahead.

Acked-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>

Best regards,
Jozsef

> > CC: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
> > Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> > ---
> > 
> >  xt_set.c |    4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > --- a/net/netfilter/xt_set.c
> > +++ b/net/netfilter/xt_set.c
> > @@ -193,7 +193,7 @@ set_match_v3(const struct sk_buff *skb,
> >  		return ret;
> >  
> >  	if (!match_counter0(opt.ext.packets, &info->packets))
> > -		return 0;
> > +		return false;
> >  	return match_counter0(opt.ext.bytes, &info->bytes);
> >  }
> >  
> > @@ -239,7 +239,7 @@ set_match_v4(const struct sk_buff *skb,
> >  		return ret;
> >  
> >  	if (!match_counter(opt.ext.packets, &info->packets))
> > -		return 0;
> > +		return false;
> >  	return match_counter(opt.ext.bytes, &info->bytes);
> >  }
> >  
> 

-
E-mail  : kadlec@blackhole.kfki.hu, kadlecsik.jozsef@wigner.mta.hu
PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : Wigner Research Centre for Physics, Hungarian Academy of Sciences
          H-1525 Budapest 114, POB. 49, Hungary

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] netfilter: ipset: fix boolreturn.cocci warnings
  2015-02-11 12:33 ` [PATCH] netfilter: ipset: fix boolreturn.cocci warnings kbuild test robot
  2015-02-11 14:40   ` Pablo Neira Ayuso
@ 2015-03-11 19:08   ` Jozsef Kadlecsik
  2015-03-11 19:12     ` Pablo Neira Ayuso
  1 sibling, 1 reply; 6+ messages in thread
From: Jozsef Kadlecsik @ 2015-03-11 19:08 UTC (permalink / raw)
  To: kbuild test robot
  Cc: kbuild-all, Pablo Neira Ayuso, Patrick McHardy, netfilter-devel,
	coreteam, netdev, linux-kernel

On Wed, 11 Feb 2015, kbuild test robot wrote:

> net/netfilter/xt_set.c:196:9-10: WARNING: return of 0/1 in function 'set_match_v3' with return type bool
> net/netfilter/xt_set.c:242:9-10: WARNING: return of 0/1 in function 'set_match_v4' with return type bool
> 
>  Return statements in functions returning bool should use
>  true/false instead of 1/0.
> Generated by: scripts/coccinelle/misc/boolreturn.cocci
> 
> CC: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>

Patch is applied, thanks.

Best regards,
Jozsef

> ---
> 
>  xt_set.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> --- a/net/netfilter/xt_set.c
> +++ b/net/netfilter/xt_set.c
> @@ -193,7 +193,7 @@ set_match_v3(const struct sk_buff *skb,
>  		return ret;
>  
>  	if (!match_counter0(opt.ext.packets, &info->packets))
> -		return 0;
> +		return false;
>  	return match_counter0(opt.ext.bytes, &info->bytes);
>  }
>  
> @@ -239,7 +239,7 @@ set_match_v4(const struct sk_buff *skb,
>  		return ret;
>  
>  	if (!match_counter(opt.ext.packets, &info->packets))
> -		return 0;
> +		return false;
>  	return match_counter(opt.ext.bytes, &info->bytes);
>  }
>  
> --
> To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

-
E-mail  : kadlec@blackhole.kfki.hu, kadlecsik.jozsef@wigner.mta.hu
PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : Wigner Research Centre for Physics, Hungarian Academy of Sciences
          H-1525 Budapest 114, POB. 49, Hungary

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] netfilter: ipset: fix boolreturn.cocci warnings
  2015-03-11 19:08   ` Jozsef Kadlecsik
@ 2015-03-11 19:12     ` Pablo Neira Ayuso
  2015-03-11 19:21       ` Jozsef Kadlecsik
  0 siblings, 1 reply; 6+ messages in thread
From: Pablo Neira Ayuso @ 2015-03-11 19:12 UTC (permalink / raw)
  To: Jozsef Kadlecsik
  Cc: kbuild test robot, kbuild-all, Patrick McHardy, netfilter-devel,
	coreteam, netdev, linux-kernel

Hi Jozsef,

On Wed, Mar 11, 2015 at 08:08:26PM +0100, Jozsef Kadlecsik wrote:
> On Wed, 11 Feb 2015, kbuild test robot wrote:
> 
> > net/netfilter/xt_set.c:196:9-10: WARNING: return of 0/1 in function 'set_match_v3' with return type bool
> > net/netfilter/xt_set.c:242:9-10: WARNING: return of 0/1 in function 'set_match_v4' with return type bool
> > 
> >  Return statements in functions returning bool should use
> >  true/false instead of 1/0.
> > Generated by: scripts/coccinelle/misc/boolreturn.cocci
> > 
> > CC: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
> > Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> 
> Patch is applied, thanks.

I took the liberty to pass this to David already.

7f73b9f netfilter: ipset: fix boolreturn.cocci warnings

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] netfilter: ipset: fix boolreturn.cocci warnings
  2015-03-11 19:12     ` Pablo Neira Ayuso
@ 2015-03-11 19:21       ` Jozsef Kadlecsik
  0 siblings, 0 replies; 6+ messages in thread
From: Jozsef Kadlecsik @ 2015-03-11 19:21 UTC (permalink / raw)
  To: Pablo Neira Ayuso
  Cc: kbuild test robot, kbuild-all, Patrick McHardy, netfilter-devel,
	coreteam, netdev, linux-kernel

On Wed, 11 Mar 2015, Pablo Neira Ayuso wrote:

> Hi Jozsef,
> 
> On Wed, Mar 11, 2015 at 08:08:26PM +0100, Jozsef Kadlecsik wrote:
> > On Wed, 11 Feb 2015, kbuild test robot wrote:
> > 
> > > net/netfilter/xt_set.c:196:9-10: WARNING: return of 0/1 in function 'set_match_v3' with return type bool
> > > net/netfilter/xt_set.c:242:9-10: WARNING: return of 0/1 in function 'set_match_v4' with return type bool
> > > 
> > >  Return statements in functions returning bool should use
> > >  true/false instead of 1/0.
> > > Generated by: scripts/coccinelle/misc/boolreturn.cocci
> > > 
> > > CC: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
> > > Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> > 
> > Patch is applied, thanks.
> 
> I took the liberty to pass this to David already.
> 
> 7f73b9f netfilter: ipset: fix boolreturn.cocci warnings

I acked it actually :-))) - just forgot about it. Sorry for the noise.

Best regards,
Jozsef
-
E-mail  : kadlec@blackhole.kfki.hu, kadlecsik.jozsef@wigner.mta.hu
PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : Wigner Research Centre for Physics, Hungarian Academy of Sciences
          H-1525 Budapest 114, POB. 49, Hungary

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-03-11 19:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <201502112043.OvntWCjd%fengguang.wu@intel.com>
2015-02-11 12:33 ` [PATCH] netfilter: ipset: fix boolreturn.cocci warnings kbuild test robot
2015-02-11 14:40   ` Pablo Neira Ayuso
2015-02-11 14:50     ` Jozsef Kadlecsik
2015-03-11 19:08   ` Jozsef Kadlecsik
2015-03-11 19:12     ` Pablo Neira Ayuso
2015-03-11 19:21       ` Jozsef Kadlecsik

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.