* net/rxrpc/rxkad.c:1165:1-3: WARNING: PTR_ERR_OR_ZERO can be used
@ 2016-06-04 23:17 kbuild test robot
2016-06-04 23:17 ` [PATCH] rxrpc: fix ptr_ret.cocci warnings kbuild test robot
2016-06-09 14:38 ` David Howells
0 siblings, 2 replies; 4+ messages in thread
From: kbuild test robot @ 2016-06-04 23:17 UTC (permalink / raw)
Cc: kbuild-all, linux-kernel, David Howells
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 049ec1b5a76d34a6980cccdb7c0baeb4eed7a993
commit: 648af7fca15901740c7aaafd55904ebd54d01860 rxrpc: Absorb the rxkad security module
date: 8 weeks ago
coccinelle warnings: (new ones prefixed by >>)
>> net/rxrpc/rxkad.c:1165:1-3: WARNING: PTR_ERR_OR_ZERO can be used
Please review and possibly fold the followup patch.
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] rxrpc: fix ptr_ret.cocci warnings
2016-06-04 23:17 net/rxrpc/rxkad.c:1165:1-3: WARNING: PTR_ERR_OR_ZERO can be used kbuild test robot
@ 2016-06-04 23:17 ` kbuild test robot
2016-06-07 22:30 ` David Miller
2016-06-09 14:38 ` David Howells
1 sibling, 1 reply; 4+ messages in thread
From: kbuild test robot @ 2016-06-04 23:17 UTC (permalink / raw)
Cc: kbuild-all, linux-kernel, David Howells, Herbert Xu, netdev
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);
}
/*
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] rxrpc: fix ptr_ret.cocci warnings
2016-06-04 23:17 ` [PATCH] rxrpc: fix ptr_ret.cocci warnings kbuild test robot
@ 2016-06-07 22:30 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2016-06-07 22:30 UTC (permalink / raw)
To: fengguang.wu; +Cc: kbuild-all, linux-kernel, dhowells, herbert, netdev
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] rxrpc: fix ptr_ret.cocci warnings
2016-06-04 23:17 net/rxrpc/rxkad.c:1165:1-3: WARNING: PTR_ERR_OR_ZERO can be used kbuild test robot
2016-06-04 23:17 ` [PATCH] rxrpc: fix ptr_ret.cocci warnings kbuild test robot
@ 2016-06-09 14:38 ` David Howells
1 sibling, 0 replies; 4+ messages in thread
From: David Howells @ 2016-06-09 14:38 UTC (permalink / raw)
To: kbuild test robot; +Cc: dhowells, kbuild-all, linux-kernel, Herbert Xu, netdev
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>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-06-09 14:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-04 23:17 net/rxrpc/rxkad.c:1165:1-3: WARNING: PTR_ERR_OR_ZERO can be used kbuild test robot
2016-06-04 23:17 ` [PATCH] rxrpc: fix ptr_ret.cocci warnings kbuild test robot
2016-06-07 22:30 ` David Miller
2016-06-09 14:38 ` David Howells
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).