Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1413894 > unrolled thread

[PATCH] rxrpc: fix ptr_ret.cocci warnings

Started bykbuild test robot <fengguang.wu@intel.com>
First post2016-06-05 01:20 +0200
Last post2016-06-09 16:40 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH] rxrpc: fix ptr_ret.cocci warnings kbuild test robot <fengguang.wu@intel.com> - 2016-06-05 01:20 +0200
    Re: [PATCH] rxrpc: fix ptr_ret.cocci warnings David Miller <davem@davemloft.net> - 2016-06-08 00:40 +0200
    Re: [PATCH] rxrpc: fix ptr_ret.cocci warnings David Howells <dhowells@redhat.com> - 2016-06-09 16:40 +0200

#1413894 — [PATCH] rxrpc: fix ptr_ret.cocci warnings

Fromkbuild test robot <fengguang.wu@intel.com>
Date2016-06-05 01:20 +0200
Subject[PATCH] rxrpc: fix ptr_ret.cocci warnings
Message-ID<rGt1f-7iX-3@gated-at.bofh.it>
net/rxrpc/rxkad.c:1165: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

CC: David Howells <dhowells@redhat.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 rxkad.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--- a/net/rxrpc/rxkad.c
+++ b/net/rxrpc/rxkad.c
@@ -1162,9 +1162,7 @@ static int rxkad_init(void)
 	/* pin the cipher we need so that the crypto layer doesn't invoke
 	 * keventd to go get it */
 	rxkad_ci = crypto_alloc_skcipher("pcbc(fcrypt)", 0, CRYPTO_ALG_ASYNC);
-	if (IS_ERR(rxkad_ci))
-		return PTR_ERR(rxkad_ci);
-	return 0;
+	return PTR_ERR_OR_ZERO(rxkad_ci);
 }
 
 /*

[toc] | [next] | [standalone]


#1416687

FromDavid Miller <davem@davemloft.net>
Date2016-06-08 00:40 +0200
Message-ID<rHxPc-6k-19@gated-at.bofh.it>
In reply to#1413894
From: kbuild test robot <fengguang.wu@intel.com>
Date: Sun, 5 Jun 2016 07:17:19 +0800

> net/rxrpc/rxkad.c:1165: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
> 
> CC: David Howells <dhowells@redhat.com>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>

Applied.

[toc] | [prev] | [next] | [standalone]


#1418391

FromDavid Howells <dhowells@redhat.com>
Date2016-06-09 16:40 +0200
Message-ID<rI9hM-7C2-19@gated-at.bofh.it>
In reply to#1413894
kbuild test robot <fengguang.wu@intel.com> wrote:

> net/rxrpc/rxkad.c:1165: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
> 
> CC: David Howells <dhowells@redhat.com>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>

Acked-by: David Howells <dhowells@redhat.com>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web