* [PATCH] netvsc: fix ptr_ret.cocci warnings
[not found] <201707220239.K3AMBOuR%fengguang.wu@intel.com>
@ 2017-07-21 18:54 ` kbuild test robot
2017-07-24 23:20 ` David Miller
0 siblings, 1 reply; 5+ messages in thread
From: kbuild test robot @ 2017-07-21 18:54 UTC (permalink / raw)
To: stephen hemminger
Cc: kbuild-all, Stephen Hemminger, K. Y. Srinivasan, Haiyang Zhang,
devel, netdev, linux-kernel
drivers/net/hyperv/netvsc_drv.c:737:8-14: 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: 9749fed5d43d ("netvsc: use ERR_PTR to avoid dereference issues")
CC: stephen hemminger <stephen@networkplumber.org>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
netvsc_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -734,7 +734,7 @@ static int netvsc_set_queues(struct net_
return ret;
net_device = rndis_filter_device_add(dev, &device_info);
- return IS_ERR(net_device) ? PTR_ERR(net_device) : 0;
+ return PTR_ERR_OR_ZERO(net_device);
}
static int netvsc_set_channels(struct net_device *net,
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] netvsc: fix ptr_ret.cocci warnings
2017-07-21 18:54 ` [PATCH] netvsc: fix ptr_ret.cocci warnings kbuild test robot
@ 2017-07-24 23:20 ` David Miller
0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2017-07-24 23:20 UTC (permalink / raw)
To: fengguang.wu
Cc: stephen, kbuild-all, sthemmin, kys, haiyangz, devel, netdev,
linux-kernel
From: kbuild test robot <fengguang.wu@intel.com>
Date: Sat, 22 Jul 2017 02:54:43 +0800
> drivers/net/hyperv/netvsc_drv.c:737:8-14: 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: 9749fed5d43d ("netvsc: use ERR_PTR to avoid dereference issues")
> CC: stephen hemminger <stephen@networkplumber.org>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Applied to net-next.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] netvsc: fix ptr_ret.cocci warnings
@ 2017-07-24 23:20 ` David Miller
0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2017-07-24 23:20 UTC (permalink / raw)
To: fengguang.wu; +Cc: sthemmin, netdev, haiyangz, linux-kernel, kbuild-all, devel
From: kbuild test robot <fengguang.wu@intel.com>
Date: Sat, 22 Jul 2017 02:54:43 +0800
> drivers/net/hyperv/netvsc_drv.c:737:8-14: 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: 9749fed5d43d ("netvsc: use ERR_PTR to avoid dereference issues")
> CC: stephen hemminger <stephen@networkplumber.org>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Applied to net-next.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] netvsc: fix ptr_ret.cocci warnings
2017-07-24 23:20 ` David Miller
(?)
@ 2017-07-24 23:21 ` Stephen Hemminger
2017-07-24 23:32 ` David Miller
-1 siblings, 1 reply; 5+ messages in thread
From: Stephen Hemminger @ 2017-07-24 23:21 UTC (permalink / raw)
To: David Miller
Cc: fengguang.wu, kbuild-all, sthemmin, kys, haiyangz, devel, netdev,
linux-kernel
On Mon, 24 Jul 2017 16:20:28 -0700 (PDT)
David Miller <davem@davemloft.net> wrote:
> From: kbuild test robot <fengguang.wu@intel.com>
> Date: Sat, 22 Jul 2017 02:54:43 +0800
>
> > drivers/net/hyperv/netvsc_drv.c:737:8-14: 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: 9749fed5d43d ("netvsc: use ERR_PTR to avoid dereference issues")
> > CC: stephen hemminger <stephen@networkplumber.org>
> > Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
>
> Applied to net-next.
That function is gone in the later patches.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] netvsc: fix ptr_ret.cocci warnings
2017-07-24 23:21 ` Stephen Hemminger
@ 2017-07-24 23:32 ` David Miller
0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2017-07-24 23:32 UTC (permalink / raw)
To: stephen
Cc: fengguang.wu, kbuild-all, sthemmin, kys, haiyangz, devel, netdev,
linux-kernel
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Mon, 24 Jul 2017 16:21:57 -0700
> On Mon, 24 Jul 2017 16:20:28 -0700 (PDT)
> David Miller <davem@davemloft.net> wrote:
>
>> From: kbuild test robot <fengguang.wu@intel.com>
>> Date: Sat, 22 Jul 2017 02:54:43 +0800
>>
>> > drivers/net/hyperv/netvsc_drv.c:737:8-14: 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: 9749fed5d43d ("netvsc: use ERR_PTR to avoid dereference issues")
>> > CC: stephen hemminger <stephen@networkplumber.org>
>> > Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
>>
>> Applied to net-next.
>
> That function is gone in the later patches.
I guess I'll deal with that when I apply that series or do a merge
then :-)
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-07-24 23:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <201707220239.K3AMBOuR%fengguang.wu@intel.com>
2017-07-21 18:54 ` [PATCH] netvsc: fix ptr_ret.cocci warnings kbuild test robot
2017-07-24 23:20 ` David Miller
2017-07-24 23:20 ` David Miller
2017-07-24 23:21 ` Stephen Hemminger
2017-07-24 23:32 ` David Miller
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.