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


Groups > linux.kernel > #1693925 > unrolled thread

[PATCH] netvsc: fix ptr_ret.cocci warnings

Started bykbuild test robot <fengguang.wu@intel.com>
First post2017-07-21 21:00 +0200
Last post2017-07-25 01:40 +0200
Articles 4 — 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] netvsc: fix ptr_ret.cocci warnings kbuild test robot <fengguang.wu@intel.com> - 2017-07-21 21:00 +0200
    Re: [PATCH] netvsc: fix ptr_ret.cocci warnings David Miller <davem@davemloft.net> - 2017-07-25 01:30 +0200
      Re: [PATCH] netvsc: fix ptr_ret.cocci warnings Stephen Hemminger <stephen@networkplumber.org> - 2017-07-25 01:30 +0200
        Re: [PATCH] netvsc: fix ptr_ret.cocci warnings David Miller <davem@davemloft.net> - 2017-07-25 01:40 +0200

#1693925 — [PATCH] netvsc: fix ptr_ret.cocci warnings

Fromkbuild test robot <fengguang.wu@intel.com>
Date2017-07-21 21:00 +0200
Subject[PATCH] netvsc: fix ptr_ret.cocci warnings
Message-ID<u5Ljz-8q5-3@gated-at.bofh.it>
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,

[toc] | [next] | [standalone]


#1695261

FromDavid Miller <davem@davemloft.net>
Date2017-07-25 01:30 +0200
Message-ID<u6UXv-3qM-5@gated-at.bofh.it>
In reply to#1693925
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.

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


#1695262

FromStephen Hemminger <stephen@networkplumber.org>
Date2017-07-25 01:30 +0200
Message-ID<u6UXw-3qM-15@gated-at.bofh.it>
In reply to#1695261
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.

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


#1695266

FromDavid Miller <davem@davemloft.net>
Date2017-07-25 01:40 +0200
Message-ID<u6V7b-3vi-15@gated-at.bofh.it>
In reply to#1695262
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 :-)

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web