Re: How to fix CHECK warning: testing a 'safe expression'

2015-01-02 Thread Josh Triplett
+linux-sparse On Fri, Jan 02, 2015 at 09:51:25AM -0500, Murali Karicheri wrote: > On 12/16/2014 01:23 PM, Murali Karicheri wrote: > >netdev maintainers, > > > >I got a comment to address CHECK warning and wondering how to address > >'warning: testing a 'safe expression' which appears when using >

Re: How to fix CHECK warning: testing a 'safe expression'

2015-01-02 Thread Murali Karicheri
+ Josh On 12/16/2014 01:23 PM, Murali Karicheri wrote: netdev maintainers, I got a comment to address CHECK warning and wondering how to address 'warning: testing a 'safe expression' which appears when using IS_ERR_OR_NULL(foo) where foo is defined as struct foo_type *foo; The foo get

Re: How to fix CHECK warning: testing a 'safe expression'

2015-01-02 Thread Murali Karicheri
+ Josh On 12/16/2014 01:23 PM, Murali Karicheri wrote: netdev maintainers, I got a comment to address CHECK warning and wondering how to address 'warning: testing a 'safe expression' which appears when using IS_ERR_OR_NULL(foo) where foo is defined as struct foo_type *foo; The foo get

Re: How to fix CHECK warning: testing a 'safe expression'

2015-01-02 Thread Josh Triplett
+linux-sparse On Fri, Jan 02, 2015 at 09:51:25AM -0500, Murali Karicheri wrote: On 12/16/2014 01:23 PM, Murali Karicheri wrote: netdev maintainers, I got a comment to address CHECK warning and wondering how to address 'warning: testing a 'safe expression' which appears when using

Re: How to fix CHECK warning: testing a 'safe expression' ?

2014-12-18 Thread Murali Karicheri
On 12/17/2014 09:39 PM, Christopher Li wrote: On Thu, Dec 18, 2014 at 6:37 AM, Murali Karicheri wrote: if (!ks_pcie) { dev_err(dev, "no memory for keystone pcie\n"); return -ENOMEM; } pp =_pcie->pp; /* initialize SerDes Phy

Re: How to fix CHECK warning: testing a 'safe expression' ?

2014-12-18 Thread Murali Karicheri
On 12/17/2014 09:39 PM, Christopher Li wrote: On Thu, Dec 18, 2014 at 6:37 AM, Murali Karicherim-kariche...@ti.com wrote: if (!ks_pcie) { dev_err(dev, no memory for keystone pcie\n); return -ENOMEM; } pp =ks_pcie-pp; /*

Re: How to fix CHECK warning: testing a 'safe expression' ?

2014-12-17 Thread Christopher Li
On Thu, Dec 18, 2014 at 6:37 AM, Murali Karicheri wrote: > if (!ks_pcie) { > dev_err(dev, "no memory for keystone pcie\n"); > return -ENOMEM; > } > pp = _pcie->pp; > > /* initialize SerDes Phy if present */ > phy =

Re: How to fix CHECK warning: testing a 'safe expression' ?

2014-12-17 Thread Murali Karicheri
On 12/17/2014 05:35 PM, Murali Karicheri wrote: On 12/17/2014 01:49 PM, Bjorn Helgaas wrote: [+cc Christopher, linux-kernel (this doesn't sound like a PCI-specific question)] On Wed, Dec 17, 2014 at 9:18 AM, Murali Karicheri wrote: I am trying to address CHECK warnings in my driver and

Re: How to fix CHECK warning: testing a 'safe expression' ?

2014-12-17 Thread Murali Karicheri
On 12/17/2014 01:49 PM, Bjorn Helgaas wrote: [+cc Christopher, linux-kernel (this doesn't sound like a PCI-specific question)] On Wed, Dec 17, 2014 at 9:18 AM, Murali Karicheri wrote: I am trying to address CHECK warnings in my driver and wondering how to resolve 'warning: testing a 'safe

Re: How to fix CHECK warning: testing a 'safe expression' ?

2014-12-17 Thread Bjorn Helgaas
[+cc Christopher, linux-kernel (this doesn't sound like a PCI-specific question)] On Wed, Dec 17, 2014 at 9:18 AM, Murali Karicheri wrote: > I am trying to address CHECK warnings in my driver and wondering how to > resolve 'warning: testing a 'safe expression' which appears when using >

Re: How to fix CHECK warning: testing a 'safe expression' ?

2014-12-17 Thread Bjorn Helgaas
[+cc Christopher, linux-kernel (this doesn't sound like a PCI-specific question)] On Wed, Dec 17, 2014 at 9:18 AM, Murali Karicheri m-kariche...@ti.com wrote: I am trying to address CHECK warnings in my driver and wondering how to resolve 'warning: testing a 'safe expression' which appears when

Re: How to fix CHECK warning: testing a 'safe expression' ?

2014-12-17 Thread Murali Karicheri
On 12/17/2014 01:49 PM, Bjorn Helgaas wrote: [+cc Christopher, linux-kernel (this doesn't sound like a PCI-specific question)] On Wed, Dec 17, 2014 at 9:18 AM, Murali Karicherim-kariche...@ti.com wrote: I am trying to address CHECK warnings in my driver and wondering how to resolve 'warning:

Re: How to fix CHECK warning: testing a 'safe expression' ?

2014-12-17 Thread Murali Karicheri
On 12/17/2014 05:35 PM, Murali Karicheri wrote: On 12/17/2014 01:49 PM, Bjorn Helgaas wrote: [+cc Christopher, linux-kernel (this doesn't sound like a PCI-specific question)] On Wed, Dec 17, 2014 at 9:18 AM, Murali Karicherim-kariche...@ti.com wrote: I am trying to address CHECK warnings in

Re: How to fix CHECK warning: testing a 'safe expression' ?

2014-12-17 Thread Christopher Li
On Thu, Dec 18, 2014 at 6:37 AM, Murali Karicheri m-kariche...@ti.com wrote: if (!ks_pcie) { dev_err(dev, no memory for keystone pcie\n); return -ENOMEM; } pp = ks_pcie-pp; /* initialize SerDes Phy if present */ phy =