All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] netfilter: nft_numgen: fix ptr_ret.cocci warnings
       [not found] <201805231855.2507c2Vh%fengguang.wu@intel.com>
@ 2018-05-23 10:58 ` kbuild test robot
  2018-05-24 10:40   ` Laura Garcia
  0 siblings, 1 reply; 3+ messages in thread
From: kbuild test robot @ 2018-05-23 10:58 UTC (permalink / raw)
  To: Laura Garcia Liebana
  Cc: kbuild-all, Pablo Neira Ayuso, Jozsef Kadlecsik,
	Florian Westphal, netfilter-devel, coreteam, netdev,
	linux-kernel

From: kbuild test robot <fengguang.wu@intel.com>

net/netfilter/nft_numgen.c:117:1-3: WARNING: PTR_ERR_OR_ZERO can be used


 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Fixes: d734a2888922 ("netfilter: nft_numgen: add map lookups for numgen statements")
CC: Laura Garcia Liebana <nevola@gmail.com>
Signed-off-by: kbuild test robot <fengguang.wu@intel.com>
---

 nft_numgen.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/net/netfilter/nft_numgen.c
+++ b/net/netfilter/nft_numgen.c
@@ -114,10 +114,7 @@ static int nft_ng_inc_map_init(const str
 					  tb[NFTA_NG_SET_NAME],
 					  tb[NFTA_NG_SET_ID], genmask);
 
-	if (IS_ERR(priv->map))
-		return PTR_ERR(priv->map);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(priv->map);
 }
 
 static int nft_ng_dump(struct sk_buff *skb, enum nft_registers dreg,

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

* Re: [PATCH] netfilter: nft_numgen: fix ptr_ret.cocci warnings
  2018-05-23 10:58 ` [PATCH] netfilter: nft_numgen: fix ptr_ret.cocci warnings kbuild test robot
@ 2018-05-24 10:40   ` Laura Garcia
  2018-06-01  7:46     ` Pablo Neira Ayuso
  0 siblings, 1 reply; 3+ messages in thread
From: Laura Garcia @ 2018-05-24 10:40 UTC (permalink / raw)
  To: kbuild test robot
  Cc: kbuild-all, Pablo Neira Ayuso, Jozsef Kadlecsik,
	Florian Westphal, Netfilter Development Mailing list, coreteam,
	netdev, linux-kernel

On Wed, May 23, 2018 at 12:58 PM, kbuild test robot
<fengguang.wu@intel.com> wrote:
> From: kbuild test robot <fengguang.wu@intel.com>
>
> net/netfilter/nft_numgen.c:117:1-3: WARNING: PTR_ERR_OR_ZERO can be used
>
>
>  Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
>
> Generated by: scripts/coccinelle/api/ptr_ret.cocci
>
> Fixes: d734a2888922 ("netfilter: nft_numgen: add map lookups for numgen statements")
> CC: Laura Garcia Liebana <nevola@gmail.com>
> Signed-off-by: kbuild test robot <fengguang.wu@intel.com>

Acked-by: Laura Garcia Liebana <nevola@gmail.com>

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

* Re: [PATCH] netfilter: nft_numgen: fix ptr_ret.cocci warnings
  2018-05-24 10:40   ` Laura Garcia
@ 2018-06-01  7:46     ` Pablo Neira Ayuso
  0 siblings, 0 replies; 3+ messages in thread
From: Pablo Neira Ayuso @ 2018-06-01  7:46 UTC (permalink / raw)
  To: Laura Garcia
  Cc: kbuild test robot, kbuild-all, Jozsef Kadlecsik,
	Florian Westphal, Netfilter Development Mailing list, coreteam,
	netdev, linux-kernel

On Thu, May 24, 2018 at 12:40:04PM +0200, Laura Garcia wrote:
> On Wed, May 23, 2018 at 12:58 PM, kbuild test robot
> <fengguang.wu@intel.com> wrote:
> > From: kbuild test robot <fengguang.wu@intel.com>
> >
> > net/netfilter/nft_numgen.c:117:1-3: WARNING: PTR_ERR_OR_ZERO can be used
> >
> >
> >  Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
> >
> > Generated by: scripts/coccinelle/api/ptr_ret.cocci
> >
> > Fixes: d734a2888922 ("netfilter: nft_numgen: add map lookups for numgen statements")
> > CC: Laura Garcia Liebana <nevola@gmail.com>
> > Signed-off-by: kbuild test robot <fengguang.wu@intel.com>
> 
> Acked-by: Laura Garcia Liebana <nevola@gmail.com>

Applied, thanks.

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

end of thread, other threads:[~2018-06-01  7:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <201805231855.2507c2Vh%fengguang.wu@intel.com>
2018-05-23 10:58 ` [PATCH] netfilter: nft_numgen: fix ptr_ret.cocci warnings kbuild test robot
2018-05-24 10:40   ` Laura Garcia
2018-06-01  7:46     ` Pablo Neira Ayuso

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.