All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH net-next] net: ethernet: ti: cpsw: Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe()
  2019-04-29 13:56 ` YueHaibing
@ 2019-04-29 13:56   ` Andrew Lunn
  -1 siblings, 0 replies; 19+ messages in thread
From: Andrew Lunn @ 2019-04-29 13:56 UTC (permalink / raw)
  To: YueHaibing
  Cc: Grygorii Strashko, Ivan Khoronzhuk, Ilias Apalodimas, linux-omap,
	netdev, kernel-janitors

On Mon, Apr 29, 2019 at 01:56:50PM +0000, YueHaibing wrote:
> Change the call to PTR_ERR to access the value just tested by IS_ERR.
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Please could you add a Fixes: tag.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH net-next] net: ethernet: ti: cpsw: Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe()
@ 2019-04-29 13:56   ` Andrew Lunn
  0 siblings, 0 replies; 19+ messages in thread
From: Andrew Lunn @ 2019-04-29 13:56 UTC (permalink / raw)
  To: YueHaibing
  Cc: Grygorii Strashko, Ivan Khoronzhuk, Ilias Apalodimas, linux-omap,
	netdev, kernel-janitors

On Mon, Apr 29, 2019 at 01:56:50PM +0000, YueHaibing wrote:
> Change the call to PTR_ERR to access the value just tested by IS_ERR.
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Please could you add a Fixes: tag.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH net-next] net: ethernet: ti: cpsw: Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe()
  2019-04-29 13:56   ` Andrew Lunn
  (?)
@ 2019-04-29 13:56 ` YueHaibing
  -1 siblings, 0 replies; 19+ messages in thread
From: YueHaibing @ 2019-04-29 13:56 UTC (permalink / raw)
  To: Grygorii Strashko, Ivan Khoronzhuk, Andrew Lunn, Ilias Apalodimas
  Cc: YueHaibing, linux-omap, netdev, kernel-janitors

Change the call to PTR_ERR to access the value just tested by IS_ERR.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/net/ethernet/ti/cpsw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index c3cba46fac9d..e37680654a13 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -2381,7 +2381,7 @@ static int cpsw_probe(struct platform_device *pdev)
 
 	clk = devm_clk_get(dev, "fck");
 	if (IS_ERR(clk)) {
-		ret = PTR_ERR(mode);
+		ret = PTR_ERR(clk);
 		dev_err(dev, "fck is not found %d\n", ret);
 		return ret;
 	}






^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH net-next] net: ethernet: ti: cpsw: Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe()
@ 2019-04-29 13:56 ` YueHaibing
  0 siblings, 0 replies; 19+ messages in thread
From: YueHaibing @ 2019-04-29 13:56 UTC (permalink / raw)
  To: Grygorii Strashko, Ivan Khoronzhuk, Andrew Lunn, Ilias Apalodimas
  Cc: YueHaibing, linux-omap, netdev, kernel-janitors

Change the call to PTR_ERR to access the value just tested by IS_ERR.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/net/ethernet/ti/cpsw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index c3cba46fac9d..e37680654a13 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -2381,7 +2381,7 @@ static int cpsw_probe(struct platform_device *pdev)
 
 	clk = devm_clk_get(dev, "fck");
 	if (IS_ERR(clk)) {
-		ret = PTR_ERR(mode);
+		ret = PTR_ERR(clk);
 		dev_err(dev, "fck is not found %d\n", ret);
 		return ret;
 	}

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH net-next] net: ethernet: ti: cpsw: Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe()
@ 2019-04-29 13:56 ` YueHaibing
  0 siblings, 0 replies; 19+ messages in thread
From: YueHaibing @ 2019-04-29 13:56 UTC (permalink / raw)
  To: Grygorii Strashko, Ivan Khoronzhuk, Andrew Lunn, Ilias Apalodimas
  Cc: YueHaibing, linux-omap, netdev, kernel-janitors

Change the call to PTR_ERR to access the value just tested by IS_ERR.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/net/ethernet/ti/cpsw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index c3cba46fac9d..e37680654a13 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -2381,7 +2381,7 @@ static int cpsw_probe(struct platform_device *pdev)
 
 	clk = devm_clk_get(dev, "fck");
 	if (IS_ERR(clk)) {
-		ret = PTR_ERR(mode);
+		ret = PTR_ERR(clk);
 		dev_err(dev, "fck is not found %d\n", ret);
 		return ret;
 	}

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: [PATCH net-next] net: ethernet: ti: cpsw: Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe()
  2019-04-29 13:56   ` Andrew Lunn
  (?)
@ 2019-04-29 14:17     ` YueHaibing
  -1 siblings, 0 replies; 19+ messages in thread
From: YueHaibing @ 2019-04-29 14:17 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Grygorii Strashko, Ivan Khoronzhuk, Ilias Apalodimas, linux-omap,
	netdev, kernel-janitors

On 2019/4/29 21:56, Andrew Lunn wrote:
> On Mon, Apr 29, 2019 at 01:56:50PM +0000, YueHaibing wrote:
>> Change the call to PTR_ERR to access the value just tested by IS_ERR.
>>
>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> 
> Please could you add a Fixes: tag.
> 

Ok, will sendv2, thanks!

> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> 
>     Andrew
> 
> .
> 


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH net-next] net: ethernet: ti: cpsw: Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe()
@ 2019-04-29 14:17     ` YueHaibing
  0 siblings, 0 replies; 19+ messages in thread
From: YueHaibing @ 2019-04-29 14:17 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Grygorii Strashko, Ivan Khoronzhuk, Ilias Apalodimas, linux-omap,
	netdev, kernel-janitors

On 2019/4/29 21:56, Andrew Lunn wrote:
> On Mon, Apr 29, 2019 at 01:56:50PM +0000, YueHaibing wrote:
>> Change the call to PTR_ERR to access the value just tested by IS_ERR.
>>
>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> 
> Please could you add a Fixes: tag.
> 

Ok, will sendv2, thanks!

> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> 
>     Andrew
> 
> .
> 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH net-next] net: ethernet: ti: cpsw: Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe()
@ 2019-04-29 14:17     ` YueHaibing
  0 siblings, 0 replies; 19+ messages in thread
From: YueHaibing @ 2019-04-29 14:17 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Grygorii Strashko, Ivan Khoronzhuk, Ilias Apalodimas, linux-omap,
	netdev, kernel-janitors

On 2019/4/29 21:56, Andrew Lunn wrote:
> On Mon, Apr 29, 2019 at 01:56:50PM +0000, YueHaibing wrote:
>> Change the call to PTR_ERR to access the value just tested by IS_ERR.
>>
>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> 
> Please could you add a Fixes: tag.
> 

Ok, will sendv2, thanks!

> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> 
>     Andrew
> 
> .
> 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH v2 net-next] net: ethernet: ti: cpsw: Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe()
  2019-04-29 13:56 ` YueHaibing
@ 2019-04-29 14:31   ` YueHaibing
  -1 siblings, 0 replies; 19+ messages in thread
From: YueHaibing @ 2019-04-29 14:31 UTC (permalink / raw)
  To: Grygorii Strashko, Ivan Khoronzhuk, Andrew Lunn, Ilias Apalodimas
  Cc: YueHaibing, linux-omap, netdev, kernel-janitors

Change the call to PTR_ERR to access the value just tested by IS_ERR.

Fixes: 83a8471ba255 ("net: ethernet: ti: cpsw: refactor probe to group common hw initialization")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
---
v2: add Fixes tag
---
 drivers/net/ethernet/ti/cpsw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index c3cba46fac9d..e37680654a13 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -2381,7 +2381,7 @@ static int cpsw_probe(struct platform_device *pdev)
 
 	clk = devm_clk_get(dev, "fck");
 	if (IS_ERR(clk)) {
-		ret = PTR_ERR(mode);
+		ret = PTR_ERR(clk);
 		dev_err(dev, "fck is not found %d\n", ret);
 		return ret;
 	}




^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v2 net-next] net: ethernet: ti: cpsw: Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe()
@ 2019-04-29 14:31   ` YueHaibing
  0 siblings, 0 replies; 19+ messages in thread
From: YueHaibing @ 2019-04-29 14:31 UTC (permalink / raw)
  To: Grygorii Strashko, Ivan Khoronzhuk, Andrew Lunn, Ilias Apalodimas
  Cc: YueHaibing, linux-omap, netdev, kernel-janitors

Change the call to PTR_ERR to access the value just tested by IS_ERR.

Fixes: 83a8471ba255 ("net: ethernet: ti: cpsw: refactor probe to group common hw initialization")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
---
v2: add Fixes tag
---
 drivers/net/ethernet/ti/cpsw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index c3cba46fac9d..e37680654a13 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -2381,7 +2381,7 @@ static int cpsw_probe(struct platform_device *pdev)
 
 	clk = devm_clk_get(dev, "fck");
 	if (IS_ERR(clk)) {
-		ret = PTR_ERR(mode);
+		ret = PTR_ERR(clk);
 		dev_err(dev, "fck is not found %d\n", ret);
 		return ret;
 	}

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 net-next] net: ethernet: ti: cpsw: Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe()
  2019-04-29 14:31   ` YueHaibing
@ 2019-04-29 16:30     ` Julia Lawall
  -1 siblings, 0 replies; 19+ messages in thread
From: Julia Lawall @ 2019-04-29 16:30 UTC (permalink / raw)
  To: YueHaibing
  Cc: Grygorii Strashko, Ivan Khoronzhuk, Andrew Lunn,
	Ilias Apalodimas, linux-omap, netdev, kernel-janitors



On Mon, 29 Apr 2019, YueHaibing wrote:

> Change the call to PTR_ERR to access the value just tested by IS_ERR.

I assume you didn't find the problem just looking through the code by
hand.  If you used a tool, it would be really good to acknowledge the tool
that was used.  The tools don't come for free, and you don't pay for them.
The only payment that you can offer is to acknowledge that the tool was
used, which helps justify that the tool is useful and what it is useful
for.

julia

>
> Fixes: 83a8471ba255 ("net: ethernet: ti: cpsw: refactor probe to group common hw initialization")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> ---
> v2: add Fixes tag
> ---
>  drivers/net/ethernet/ti/cpsw.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
> index c3cba46fac9d..e37680654a13 100644
> --- a/drivers/net/ethernet/ti/cpsw.c
> +++ b/drivers/net/ethernet/ti/cpsw.c
> @@ -2381,7 +2381,7 @@ static int cpsw_probe(struct platform_device *pdev)
>
>  	clk = devm_clk_get(dev, "fck");
>  	if (IS_ERR(clk)) {
> -		ret = PTR_ERR(mode);
> +		ret = PTR_ERR(clk);
>  		dev_err(dev, "fck is not found %d\n", ret);
>  		return ret;
>  	}
>
>
>
>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 net-next] net: ethernet: ti: cpsw: Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe()
@ 2019-04-29 16:30     ` Julia Lawall
  0 siblings, 0 replies; 19+ messages in thread
From: Julia Lawall @ 2019-04-29 16:30 UTC (permalink / raw)
  To: YueHaibing
  Cc: Grygorii Strashko, Ivan Khoronzhuk, Andrew Lunn,
	Ilias Apalodimas, linux-omap, netdev, kernel-janitors



On Mon, 29 Apr 2019, YueHaibing wrote:

> Change the call to PTR_ERR to access the value just tested by IS_ERR.

I assume you didn't find the problem just looking through the code by
hand.  If you used a tool, it would be really good to acknowledge the tool
that was used.  The tools don't come for free, and you don't pay for them.
The only payment that you can offer is to acknowledge that the tool was
used, which helps justify that the tool is useful and what it is useful
for.

julia

>
> Fixes: 83a8471ba255 ("net: ethernet: ti: cpsw: refactor probe to group common hw initialization")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> ---
> v2: add Fixes tag
> ---
>  drivers/net/ethernet/ti/cpsw.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
> index c3cba46fac9d..e37680654a13 100644
> --- a/drivers/net/ethernet/ti/cpsw.c
> +++ b/drivers/net/ethernet/ti/cpsw.c
> @@ -2381,7 +2381,7 @@ static int cpsw_probe(struct platform_device *pdev)
>
>  	clk = devm_clk_get(dev, "fck");
>  	if (IS_ERR(clk)) {
> -		ret = PTR_ERR(mode);
> +		ret = PTR_ERR(clk);
>  		dev_err(dev, "fck is not found %d\n", ret);
>  		return ret;
>  	}
>
>
>
>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 net-next] net: ethernet: ti: cpsw: Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe()
  2019-04-29 16:30     ` Julia Lawall
  (?)
@ 2019-04-30  1:33       ` YueHaibing
  -1 siblings, 0 replies; 19+ messages in thread
From: YueHaibing @ 2019-04-30  1:33 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Grygorii Strashko, Ivan Khoronzhuk, Andrew Lunn,
	Ilias Apalodimas, linux-omap, netdev, kernel-janitors

On 2019/4/30 0:30, Julia Lawall wrote:
> 
> 
> On Mon, 29 Apr 2019, YueHaibing wrote:
> 
>> Change the call to PTR_ERR to access the value just tested by IS_ERR.
> 
> I assume you didn't find the problem just looking through the code by
> hand.  If you used a tool, it would be really good to acknowledge the tool
> that was used.  The tools don't come for free, and you don't pay for them.
> The only payment that you can offer is to acknowledge that the tool was
> used, which helps justify that the tool is useful and what it is useful
> for.

Sorry, I forgot edit the commit log and add this info.

It was detected by Coccinelle, I will add this and resend.

> 
> julia
> 
>>
>> Fixes: 83a8471ba255 ("net: ethernet: ti: cpsw: refactor probe to group common hw initialization")
>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
>> ---
>> v2: add Fixes tag
>> ---
>>  drivers/net/ethernet/ti/cpsw.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
>> index c3cba46fac9d..e37680654a13 100644
>> --- a/drivers/net/ethernet/ti/cpsw.c
>> +++ b/drivers/net/ethernet/ti/cpsw.c
>> @@ -2381,7 +2381,7 @@ static int cpsw_probe(struct platform_device *pdev)
>>
>>  	clk = devm_clk_get(dev, "fck");
>>  	if (IS_ERR(clk)) {
>> -		ret = PTR_ERR(mode);
>> +		ret = PTR_ERR(clk);
>>  		dev_err(dev, "fck is not found %d\n", ret);
>>  		return ret;
>>  	}
>>
>>
>>
>>
> 
> .
> 


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 net-next] net: ethernet: ti: cpsw: Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe()
@ 2019-04-30  1:33       ` YueHaibing
  0 siblings, 0 replies; 19+ messages in thread
From: YueHaibing @ 2019-04-30  1:33 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Grygorii Strashko, Ivan Khoronzhuk, Andrew Lunn,
	Ilias Apalodimas, linux-omap, netdev, kernel-janitors

On 2019/4/30 0:30, Julia Lawall wrote:
> 
> 
> On Mon, 29 Apr 2019, YueHaibing wrote:
> 
>> Change the call to PTR_ERR to access the value just tested by IS_ERR.
> 
> I assume you didn't find the problem just looking through the code by
> hand.  If you used a tool, it would be really good to acknowledge the tool
> that was used.  The tools don't come for free, and you don't pay for them.
> The only payment that you can offer is to acknowledge that the tool was
> used, which helps justify that the tool is useful and what it is useful
> for.

Sorry, I forgot edit the commit log and add this info.

It was detected by Coccinelle, I will add this and resend.

> 
> julia
> 
>>
>> Fixes: 83a8471ba255 ("net: ethernet: ti: cpsw: refactor probe to group common hw initialization")
>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
>> ---
>> v2: add Fixes tag
>> ---
>>  drivers/net/ethernet/ti/cpsw.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
>> index c3cba46fac9d..e37680654a13 100644
>> --- a/drivers/net/ethernet/ti/cpsw.c
>> +++ b/drivers/net/ethernet/ti/cpsw.c
>> @@ -2381,7 +2381,7 @@ static int cpsw_probe(struct platform_device *pdev)
>>
>>  	clk = devm_clk_get(dev, "fck");
>>  	if (IS_ERR(clk)) {
>> -		ret = PTR_ERR(mode);
>> +		ret = PTR_ERR(clk);
>>  		dev_err(dev, "fck is not found %d\n", ret);
>>  		return ret;
>>  	}
>>
>>
>>
>>
> 
> .
> 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 net-next] net: ethernet: ti: cpsw: Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe()
@ 2019-04-30  1:33       ` YueHaibing
  0 siblings, 0 replies; 19+ messages in thread
From: YueHaibing @ 2019-04-30  1:33 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Grygorii Strashko, Ivan Khoronzhuk, Andrew Lunn,
	Ilias Apalodimas, linux-omap, netdev, kernel-janitors

On 2019/4/30 0:30, Julia Lawall wrote:
> 
> 
> On Mon, 29 Apr 2019, YueHaibing wrote:
> 
>> Change the call to PTR_ERR to access the value just tested by IS_ERR.
> 
> I assume you didn't find the problem just looking through the code by
> hand.  If you used a tool, it would be really good to acknowledge the tool
> that was used.  The tools don't come for free, and you don't pay for them.
> The only payment that you can offer is to acknowledge that the tool was
> used, which helps justify that the tool is useful and what it is useful
> for.

Sorry, I forgot edit the commit log and add this info.

It was detected by Coccinelle, I will add this and resend.

> 
> julia
> 
>>
>> Fixes: 83a8471ba255 ("net: ethernet: ti: cpsw: refactor probe to group common hw initialization")
>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
>> ---
>> v2: add Fixes tag
>> ---
>>  drivers/net/ethernet/ti/cpsw.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
>> index c3cba46fac9d..e37680654a13 100644
>> --- a/drivers/net/ethernet/ti/cpsw.c
>> +++ b/drivers/net/ethernet/ti/cpsw.c
>> @@ -2381,7 +2381,7 @@ static int cpsw_probe(struct platform_device *pdev)
>>
>>  	clk = devm_clk_get(dev, "fck");
>>  	if (IS_ERR(clk)) {
>> -		ret = PTR_ERR(mode);
>> +		ret = PTR_ERR(clk);
>>  		dev_err(dev, "fck is not found %d\n", ret);
>>  		return ret;
>>  	}
>>
>>
>>
>>
> 
> .
> 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH v3 net-next] net: ethernet: ti: cpsw: Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe()
  2019-04-29 14:31   ` YueHaibing
@ 2019-04-30  1:55     ` YueHaibing
  -1 siblings, 0 replies; 19+ messages in thread
From: YueHaibing @ 2019-04-30  1:55 UTC (permalink / raw)
  To: Grygorii Strashko, Ivan Khoronzhuk, Andrew Lunn,
	Ilias Apalodimas, julia.lawall
  Cc: YueHaibing, linux-omap, netdev, kernel-janitors

Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe,
The proper pointer to use is clk instead of mode.

This issue was detected with the help of Coccinelle.

Fixes: 83a8471ba255 ("net: ethernet: ti: cpsw: refactor probe to group common hw initialization")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
---
v3: Fix commit log
v2: add Fixes tag
---
 drivers/net/ethernet/ti/cpsw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index c3cba46fac9d..e37680654a13 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -2381,7 +2381,7 @@ static int cpsw_probe(struct platform_device *pdev)
 
 	clk = devm_clk_get(dev, "fck");
 	if (IS_ERR(clk)) {
-		ret = PTR_ERR(mode);
+		ret = PTR_ERR(clk);
 		dev_err(dev, "fck is not found %d\n", ret);
 		return ret;
 	}




^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v3 net-next] net: ethernet: ti: cpsw: Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe()
@ 2019-04-30  1:55     ` YueHaibing
  0 siblings, 0 replies; 19+ messages in thread
From: YueHaibing @ 2019-04-30  1:55 UTC (permalink / raw)
  To: Grygorii Strashko, Ivan Khoronzhuk, Andrew Lunn,
	Ilias Apalodimas, julia.lawall
  Cc: YueHaibing, linux-omap, netdev, kernel-janitors

Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe,
The proper pointer to use is clk instead of mode.

This issue was detected with the help of Coccinelle.

Fixes: 83a8471ba255 ("net: ethernet: ti: cpsw: refactor probe to group common hw initialization")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
---
v3: Fix commit log
v2: add Fixes tag
---
 drivers/net/ethernet/ti/cpsw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index c3cba46fac9d..e37680654a13 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -2381,7 +2381,7 @@ static int cpsw_probe(struct platform_device *pdev)
 
 	clk = devm_clk_get(dev, "fck");
 	if (IS_ERR(clk)) {
-		ret = PTR_ERR(mode);
+		ret = PTR_ERR(clk);
 		dev_err(dev, "fck is not found %d\n", ret);
 		return ret;
 	}

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: [PATCH v3 net-next] net: ethernet: ti: cpsw: Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe()
  2019-04-30  1:55     ` YueHaibing
@ 2019-05-01 18:29       ` David Miller
  -1 siblings, 0 replies; 19+ messages in thread
From: David Miller @ 2019-05-01 18:29 UTC (permalink / raw)
  To: yuehaibing
  Cc: grygorii.strashko, ivan.khoronzhuk, andrew, ilias.apalodimas,
	julia.lawall, linux-omap, netdev, kernel-janitors

From: YueHaibing <yuehaibing@huawei.com>
Date: Tue, 30 Apr 2019 01:55:24 +0000

> Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe,
> The proper pointer to use is clk instead of mode.
> 
> This issue was detected with the help of Coccinelle.
> 
> Fixes: 83a8471ba255 ("net: ethernet: ti: cpsw: refactor probe to group common hw initialization")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> ---
> v3: Fix commit log
> v2: add Fixes tag

Applied.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v3 net-next] net: ethernet: ti: cpsw: Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe()
@ 2019-05-01 18:29       ` David Miller
  0 siblings, 0 replies; 19+ messages in thread
From: David Miller @ 2019-05-01 18:29 UTC (permalink / raw)
  To: yuehaibing
  Cc: grygorii.strashko, ivan.khoronzhuk, andrew, ilias.apalodimas,
	julia.lawall, linux-omap, netdev, kernel-janitors

From: YueHaibing <yuehaibing@huawei.com>
Date: Tue, 30 Apr 2019 01:55:24 +0000

> Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe,
> The proper pointer to use is clk instead of mode.
> 
> This issue was detected with the help of Coccinelle.
> 
> Fixes: 83a8471ba255 ("net: ethernet: ti: cpsw: refactor probe to group common hw initialization")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> ---
> v3: Fix commit log
> v2: add Fixes tag

Applied.

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2019-05-01 18:29 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-29 13:56 [PATCH net-next] net: ethernet: ti: cpsw: Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe() YueHaibing
2019-04-29 13:56 ` YueHaibing
2019-04-29 13:56 ` YueHaibing
2019-04-29 13:56 ` Andrew Lunn
2019-04-29 13:56   ` Andrew Lunn
2019-04-29 14:17   ` YueHaibing
2019-04-29 14:17     ` YueHaibing
2019-04-29 14:17     ` YueHaibing
2019-04-29 14:31 ` [PATCH v2 " YueHaibing
2019-04-29 14:31   ` YueHaibing
2019-04-29 16:30   ` Julia Lawall
2019-04-29 16:30     ` Julia Lawall
2019-04-30  1:33     ` YueHaibing
2019-04-30  1:33       ` YueHaibing
2019-04-30  1:33       ` YueHaibing
2019-04-30  1:55   ` [PATCH v3 " YueHaibing
2019-04-30  1:55     ` YueHaibing
2019-05-01 18:29     ` David Miller
2019-05-01 18:29       ` 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.