Linux I2C development
 help / color / mirror / Atom feed
* [PATCH -next] i2c: imx: Fix inconsistent IS_ERR and PTR_ERR in i2c_imx_dma_request()
@ 2019-01-17  3:14 YueHaibing
  2019-01-17  5:21 ` Oleksij Rempel
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: YueHaibing @ 2019-01-17  3:14 UTC (permalink / raw)
  To: shawnguo, s.hauer, kernel, fabio.estevam, linux-imx, peda,
	wsa+renesas, u.kleine-koenig, l.stach, eha, linux
  Cc: kernel-janitors, YueHaibing, linux-i2c, linux-arm-kernel

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

Fixes: 5b3a23a3cc94 ("i2c: imx: notify about real errors on dma i2c_imx_dma_request")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/i2c/busses/i2c-imx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index 09b1245..42fed40 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -287,7 +287,7 @@ static int i2c_imx_dma_request(struct imx_i2c_struct *i2c_imx,
 
 	dma->chan_tx = dma_request_chan(dev, "tx");
 	if (IS_ERR(dma->chan_tx)) {
-		ret = PTR_ERR(dma->chan_rx);
+		ret = PTR_ERR(dma->chan_tx);
 		if (ret != -ENODEV && ret != -EPROBE_DEFER)
 			dev_err(dev, "can't request DMA tx channel (%d)\n", ret);
 		goto fail_al;

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

* Re: [PATCH -next] i2c: imx: Fix inconsistent IS_ERR and PTR_ERR in i2c_imx_dma_request()
  2019-01-17  3:14 [PATCH -next] i2c: imx: Fix inconsistent IS_ERR and PTR_ERR in i2c_imx_dma_request() YueHaibing
@ 2019-01-17  5:21 ` Oleksij Rempel
  2019-01-17 11:03 ` Peter Rosin
  2019-01-22 22:49 ` Wolfram Sang
  2 siblings, 0 replies; 5+ messages in thread
From: Oleksij Rempel @ 2019-01-17  5:21 UTC (permalink / raw)
  To: YueHaibing, shawnguo, s.hauer, kernel, fabio.estevam, linux-imx,
	peda, wsa+renesas, u.kleine-koenig, l.stach, eha, linux
  Cc: kernel-janitors, linux-i2c, linux-arm-kernel

Hi,

thank you.

On 17.01.19 04:14, YueHaibing wrote:
> Change the call to PTR_ERR to access the value just tested by IS_ERR.
> 
> Fixes: 5b3a23a3cc94 ("i2c: imx: notify about real errors on dma i2c_imx_dma_request")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>

> ---
>   drivers/i2c/busses/i2c-imx.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
> index 09b1245..42fed40 100644
> --- a/drivers/i2c/busses/i2c-imx.c
> +++ b/drivers/i2c/busses/i2c-imx.c
> @@ -287,7 +287,7 @@ static int i2c_imx_dma_request(struct imx_i2c_struct *i2c_imx,
>   
>   	dma->chan_tx = dma_request_chan(dev, "tx");
>   	if (IS_ERR(dma->chan_tx)) {
> -		ret = PTR_ERR(dma->chan_rx);
> +		ret = PTR_ERR(dma->chan_tx);
>   		if (ret != -ENODEV && ret != -EPROBE_DEFER)
>   			dev_err(dev, "can't request DMA tx channel (%d)\n", ret);
>   		goto fail_al;
> 
> 
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

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

* Re: [PATCH -next] i2c: imx: Fix inconsistent IS_ERR and PTR_ERR in i2c_imx_dma_request()
  2019-01-17  3:14 [PATCH -next] i2c: imx: Fix inconsistent IS_ERR and PTR_ERR in i2c_imx_dma_request() YueHaibing
  2019-01-17  5:21 ` Oleksij Rempel
@ 2019-01-17 11:03 ` Peter Rosin
  2019-01-22 22:50   ` Wolfram Sang
  2019-01-22 22:49 ` Wolfram Sang
  2 siblings, 1 reply; 5+ messages in thread
From: Peter Rosin @ 2019-01-17 11:03 UTC (permalink / raw)
  To: YueHaibing, shawnguo@kernel.org, s.hauer@pengutronix.de,
	kernel@pengutronix.de, fabio.estevam@nxp.com, linux-imx@nxp.com,
	wsa+renesas@sang-engineering.com, u.kleine-koenig@pengutronix.de,
	l.stach@pengutronix.de, eha@deif.com, linux@rempel-privat.de
  Cc: kernel-janitors@vger.kernel.org, linux-i2c@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org

On 2019-01-17 04:14, YueHaibing wrote:
> Change the call to PTR_ERR to access the value just tested by IS_ERR.
> 
> Fixes: 5b3a23a3cc94 ("i2c: imx: notify about real errors on dma i2c_imx_dma_request")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/i2c/busses/i2c-imx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
> index 09b1245..42fed40 100644
> --- a/drivers/i2c/busses/i2c-imx.c
> +++ b/drivers/i2c/busses/i2c-imx.c
> @@ -287,7 +287,7 @@ static int i2c_imx_dma_request(struct imx_i2c_struct *i2c_imx,
>  
>  	dma->chan_tx = dma_request_chan(dev, "tx");
>  	if (IS_ERR(dma->chan_tx)) {
> -		ret = PTR_ERR(dma->chan_rx);
> +		ret = PTR_ERR(dma->chan_tx);
>  		if (ret != -ENODEV && ret != -EPROBE_DEFER)
>  			dev_err(dev, "can't request DMA tx channel (%d)\n", ret);
>  		goto fail_al;
> 
> 
> 

You were beaten to it by Laurentiu Tudor, who sent the same patch [1] shortly
before you.

https://lore.kernel.org/patchwork/patch/1032511/

Cheers,
Peter

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

* Re: [PATCH -next] i2c: imx: Fix inconsistent IS_ERR and PTR_ERR in i2c_imx_dma_request()
  2019-01-17  3:14 [PATCH -next] i2c: imx: Fix inconsistent IS_ERR and PTR_ERR in i2c_imx_dma_request() YueHaibing
  2019-01-17  5:21 ` Oleksij Rempel
  2019-01-17 11:03 ` Peter Rosin
@ 2019-01-22 22:49 ` Wolfram Sang
  2 siblings, 0 replies; 5+ messages in thread
From: Wolfram Sang @ 2019-01-22 22:49 UTC (permalink / raw)
  To: YueHaibing
  Cc: eha, s.hauer, kernel-janitors, linux, linux-i2c, wsa+renesas,
	linux-imx, kernel, u.kleine-koenig, fabio.estevam, shawnguo, peda,
	linux-arm-kernel, l.stach


[-- Attachment #1.1: Type: text/plain, Size: 314 bytes --]

On Thu, Jan 17, 2019 at 03:14:54AM +0000, YueHaibing wrote:
> Change the call to PTR_ERR to access the value just tested by IS_ERR.
> 
> Fixes: 5b3a23a3cc94 ("i2c: imx: notify about real errors on dma i2c_imx_dma_request")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Applied to for-next, thanks!


[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH -next] i2c: imx: Fix inconsistent IS_ERR and PTR_ERR in i2c_imx_dma_request()
  2019-01-17 11:03 ` Peter Rosin
@ 2019-01-22 22:50   ` Wolfram Sang
  0 siblings, 0 replies; 5+ messages in thread
From: Wolfram Sang @ 2019-01-22 22:50 UTC (permalink / raw)
  To: Peter Rosin
  Cc: eha@deif.com, kernel-janitors@vger.kernel.org,
	s.hauer@pengutronix.de, YueHaibing, linux@rempel-privat.de,
	linux-i2c@vger.kernel.org, wsa+renesas@sang-engineering.com,
	linux-imx@nxp.com, kernel@pengutronix.de,
	u.kleine-koenig@pengutronix.de, fabio.estevam@nxp.com,
	shawnguo@kernel.org, linux-arm-kernel@lists.infradead.org,
	l.stach@pengutronix.de


[-- Attachment #1.1: Type: text/plain, Size: 1242 bytes --]

On Thu, Jan 17, 2019 at 11:03:20AM +0000, Peter Rosin wrote:
> On 2019-01-17 04:14, YueHaibing wrote:
> > Change the call to PTR_ERR to access the value just tested by IS_ERR.
> > 
> > Fixes: 5b3a23a3cc94 ("i2c: imx: notify about real errors on dma i2c_imx_dma_request")
> > Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> > ---
> >  drivers/i2c/busses/i2c-imx.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
> > index 09b1245..42fed40 100644
> > --- a/drivers/i2c/busses/i2c-imx.c
> > +++ b/drivers/i2c/busses/i2c-imx.c
> > @@ -287,7 +287,7 @@ static int i2c_imx_dma_request(struct imx_i2c_struct *i2c_imx,
> >  
> >  	dma->chan_tx = dma_request_chan(dev, "tx");
> >  	if (IS_ERR(dma->chan_tx)) {
> > -		ret = PTR_ERR(dma->chan_rx);
> > +		ret = PTR_ERR(dma->chan_tx);
> >  		if (ret != -ENODEV && ret != -EPROBE_DEFER)
> >  			dev_err(dev, "can't request DMA tx channel (%d)\n", ret);
> >  		goto fail_al;
> > 
> > 
> > 
> 
> You were beaten to it by Laurentiu Tudor, who sent the same patch [1] shortly
> before you.

Yes, but his Fixes: tag was wrong, so I applied this patch with Uwe's
tag moved to here.


[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2019-01-22 22:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-17  3:14 [PATCH -next] i2c: imx: Fix inconsistent IS_ERR and PTR_ERR in i2c_imx_dma_request() YueHaibing
2019-01-17  5:21 ` Oleksij Rempel
2019-01-17 11:03 ` Peter Rosin
2019-01-22 22:50   ` Wolfram Sang
2019-01-22 22:49 ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox