* [ipsec-next:testing 13/13] net/xfrm/xfrm_interface.c:692:1-3: WARNING: PTR_ERR_OR_ZERO can be used
@ 2018-07-26 7:09 kbuild test robot
2018-07-26 7:09 ` [PATCH] xfrm: fix ptr_ret.cocci warnings kbuild test robot
0 siblings, 1 reply; 3+ messages in thread
From: kbuild test robot @ 2018-07-26 7:09 UTC (permalink / raw)
To: Benedict Wong; +Cc: kbuild-all, netdev, Steffen Klassert
tree: https://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next.git testing
head: 44e2b838c24d883dae8496dc7b6ddac7956ba53c
commit: 44e2b838c24d883dae8496dc7b6ddac7956ba53c [13/13] xfrm: Return detailed errors from xfrmi_newlink
coccinelle warnings: (new ones prefixed by >>)
>> net/xfrm/xfrm_interface.c:692: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] 3+ messages in thread
* [PATCH] xfrm: fix ptr_ret.cocci warnings
2018-07-26 7:09 [ipsec-next:testing 13/13] net/xfrm/xfrm_interface.c:692:1-3: WARNING: PTR_ERR_OR_ZERO can be used kbuild test robot
@ 2018-07-26 7:09 ` kbuild test robot
2018-07-27 5:39 ` Steffen Klassert
0 siblings, 1 reply; 3+ messages in thread
From: kbuild test robot @ 2018-07-26 7:09 UTC (permalink / raw)
To: Benedict Wong; +Cc: kbuild-all, netdev, Steffen Klassert
From: kbuild test robot <fengguang.wu@intel.com>
net/xfrm/xfrm_interface.c:692: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: 44e2b838c24d ("xfrm: Return detailed errors from xfrmi_newlink")
CC: Benedict Wong <benedictwong@google.com>
Signed-off-by: kbuild test robot <fengguang.wu@intel.com>
---
xfrm_interface.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
--- a/net/xfrm/xfrm_interface.c
+++ b/net/xfrm/xfrm_interface.c
@@ -689,10 +689,7 @@ static int xfrmi_newlink(struct net *src
nla_strlcpy(p->name, tb[IFLA_IFNAME], IFNAMSIZ);
xi = xfrmi_locate(net, p, 1);
- if (IS_ERR(xi))
- return PTR_ERR(xi);
-
- return 0;
+ return PTR_ERR_OR_ZERO(xi);
}
static void xfrmi_dellink(struct net_device *dev, struct list_head *head)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xfrm: fix ptr_ret.cocci warnings
2018-07-26 7:09 ` [PATCH] xfrm: fix ptr_ret.cocci warnings kbuild test robot
@ 2018-07-27 5:39 ` Steffen Klassert
0 siblings, 0 replies; 3+ messages in thread
From: Steffen Klassert @ 2018-07-27 5:39 UTC (permalink / raw)
To: kbuild test robot; +Cc: Benedict Wong, kbuild-all, netdev
On Thu, Jul 26, 2018 at 03:09:52PM +0800, kbuild test robot wrote:
> From: kbuild test robot <fengguang.wu@intel.com>
>
> net/xfrm/xfrm_interface.c:692: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: 44e2b838c24d ("xfrm: Return detailed errors from xfrmi_newlink")
> CC: Benedict Wong <benedictwong@google.com>
> Signed-off-by: kbuild test robot <fengguang.wu@intel.com>
Applied, thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-07-27 6:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-26 7:09 [ipsec-next:testing 13/13] net/xfrm/xfrm_interface.c:692:1-3: WARNING: PTR_ERR_OR_ZERO can be used kbuild test robot
2018-07-26 7:09 ` [PATCH] xfrm: fix ptr_ret.cocci warnings kbuild test robot
2018-07-27 5:39 ` Steffen Klassert
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.