Re: [PATCH 6/7] drivers: net: cpsw: fix error return code

2015-12-26 Thread Sergei Shtylyov
On 12/26/2015 11:07 PM, Julia Lawall wrote: diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 3409e80..6a76992 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -2448,8 +2448,10 @@ static int cpsw_probe(struct platform_device *pd

Re: [PATCH 6/7] drivers: net: cpsw: fix error return code

2015-12-26 Thread Julia Lawall
On Sat, 26 Dec 2015, Sergei Shtylyov wrote: > Hello. > > On 12/26/2015 08:50 PM, Sergei Shtylyov wrote: > > > > > > diff --git a/drivers/net/ethernet/ti/cpsw.c > > > > > b/drivers/net/ethernet/ti/cpsw.c > > > > > index 3409e80..6a76992 100644 > > > > > --- a/drivers/net/ethernet/ti/cpsw.c > > >

Re: [PATCH 6/7] drivers: net: cpsw: fix error return code

2015-12-26 Thread Sergei Shtylyov
Hello. On 12/26/2015 08:50 PM, Sergei Shtylyov wrote: diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 3409e80..6a76992 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -2448,8 +2448,10 @@ static int cpsw_probe(struct platform

Re: [PATCH 6/7] drivers: net: cpsw: fix error return code

2015-12-26 Thread Sergei Shtylyov
On 12/26/2015 8:40 PM, Julia Lawall wrote: diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 3409e80..6a76992 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -2448,8 +2448,10 @@ static int cpsw_probe(struct platform_device *pde

Re: [PATCH 6/7] drivers: net: cpsw: fix error return code

2015-12-26 Thread Julia Lawall
> > diff --git a/drivers/net/ethernet/ti/cpsw.c > > b/drivers/net/ethernet/ti/cpsw.c > > index 3409e80..6a76992 100644 > > --- a/drivers/net/ethernet/ti/cpsw.c > > +++ b/drivers/net/ethernet/ti/cpsw.c > > @@ -2448,8 +2448,10 @@ static int cpsw_probe(struct platform_device *pdev) > > > > /* RX

Re: [PATCH 6/7] drivers: net: cpsw: fix error return code

2015-12-26 Thread Sergei Shtylyov
Hello. On 12/26/2015 6:28 PM, Julia Lawall wrote: Return a negative error code on failure. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier ret; expression e1,e2; @@ ( if (\(ret < 0\|ret != 0\)) { ... return ret

[PATCH 6/7] drivers: net: cpsw: fix error return code

2015-12-26 Thread Julia Lawall
Return a negative error code on failure. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier ret; expression e1,e2; @@ ( if (\(ret < 0\|ret != 0\)) { ... return ret; } | ret = 0 ) ... when != ret = e1 when != &ret *