All of lore.kernel.org
 help / color / mirror / Atom feed
From: YueHaibing <yuehaibing@huawei.com>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>,
	Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>,
	Andrew Lunn <andrew@lunn.ch>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	<linux-omap@vger.kernel.org>, <netdev@vger.kernel.org>,
	<kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH v2 net-next] net: ethernet: ti: cpsw: Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe()
Date: Tue, 30 Apr 2019 09:33:16 +0800	[thread overview]
Message-ID: <a2766de6-d0cd-d840-2546-33ce0b388585@huawei.com> (raw)
In-Reply-To: <alpine.DEB.2.21.1904291228000.2444@hadrien>

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;
>>  	}
>>
>>
>>
>>
> 
> .
> 


WARNING: multiple messages have this Message-ID (diff)
From: YueHaibing <yuehaibing@huawei.com>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>,
	Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>,
	Andrew Lunn <andrew@lunn.ch>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	linux-omap@vger.kernel.org, netdev@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH v2 net-next] net: ethernet: ti: cpsw: Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe()
Date: Tue, 30 Apr 2019 01:33:16 +0000	[thread overview]
Message-ID: <a2766de6-d0cd-d840-2546-33ce0b388585@huawei.com> (raw)
In-Reply-To: <alpine.DEB.2.21.1904291228000.2444@hadrien>

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;
>>  	}
>>
>>
>>
>>
> 
> .
> 

WARNING: multiple messages have this Message-ID (diff)
From: YueHaibing <yuehaibing@huawei.com>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>,
	Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>,
	Andrew Lunn <andrew@lunn.ch>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	linux-omap@vger.kernel.org, netdev@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH v2 net-next] net: ethernet: ti: cpsw: Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe()
Date: Tue, 30 Apr 2019 09:33:16 +0800	[thread overview]
Message-ID: <a2766de6-d0cd-d840-2546-33ce0b388585@huawei.com> (raw)
In-Reply-To: <alpine.DEB.2.21.1904291228000.2444@hadrien>

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;
>>  	}
>>
>>
>>
>>
> 
> .
> 

  reply	other threads:[~2019-04-30  1:33 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a2766de6-d0cd-d840-2546-33ce0b388585@huawei.com \
    --to=yuehaibing@huawei.com \
    --cc=andrew@lunn.ch \
    --cc=grygorii.strashko@ti.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=ivan.khoronzhuk@linaro.org \
    --cc=julia.lawall@lip6.fr \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.