All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: kernel-janitors@vger.kernel.org,
	Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
	linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/7] omapfb: fix error return code
Date: Tue, 29 Dec 2015 09:06:05 +0000	[thread overview]
Message-ID: <56824CFD.9000903@ti.com> (raw)
In-Reply-To: <1451143726-28195-4-git-send-email-Julia.Lawall@lip6.fr>

[-- Attachment #1: Type: text/plain, Size: 1947 bytes --]


On 26/12/15 17:28, 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/)
> 
> // <smpl>
> @@
> identifier ret; expression e1,e2;
> @@
> (
> if (\(ret < 0\|ret != 0\))
>  { ... return ret; }
> |
> ret = 0
> )
> ... when != ret = e1
>     when != &ret
> *if(...)
> {
>   ... when != ret = e2
>       when forall
>  return ret;
> }
> // </smpl>
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
> 
> ---
>  drivers/video/fbdev/omap2/omapfb/displays/encoder-tpd12s015.c |   12 +++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/video/fbdev/omap2/omapfb/displays/encoder-tpd12s015.c b/drivers/video/fbdev/omap2/omapfb/displays/encoder-tpd12s015.c
> index 677e254..fc4cfa9 100644
> --- a/drivers/video/fbdev/omap2/omapfb/displays/encoder-tpd12s015.c
> +++ b/drivers/video/fbdev/omap2/omapfb/displays/encoder-tpd12s015.c
> @@ -241,22 +241,28 @@ static int tpd_probe(struct platform_device *pdev)
>  
>  	gpio = devm_gpiod_get_index_optional(&pdev->dev, NULL, 0,
>  		GPIOD_OUT_LOW);
> -	if (IS_ERR(gpio))
> +	if (IS_ERR(gpio)) {
> +		r = PTR_ERR(gpio);
>  		goto err_gpio;
> +	}
>  
>  	ddata->ct_cp_hpd_gpio = gpio;
>  
>  	gpio = devm_gpiod_get_index_optional(&pdev->dev, NULL, 1,
>  		GPIOD_OUT_LOW);
> -	if (IS_ERR(gpio))
> +	if (IS_ERR(gpio)) {
> +		r = PTR_ERR(gpio);
>  		goto err_gpio;
> +	}
>  
>  	ddata->ls_oe_gpio = gpio;
>  
>  	gpio = devm_gpiod_get_index(&pdev->dev, NULL, 2,
>  		GPIOD_IN);
> -	if (IS_ERR(gpio))
> +	if (IS_ERR(gpio)) {
> +		r = PTR_ERR(gpio);
>  		goto err_gpio;
> +	}
>  
>  	ddata->hpd_gpio = gpio;

Thanks. Looks like recent changes to the driver break the error
handling. I'll just drop those patches from my for-next branch, and let
the author fix the patches.

 Tomi


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: kernel-janitors@vger.kernel.org,
	Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
	linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/7] omapfb: fix error return code
Date: Tue, 29 Dec 2015 11:06:05 +0200	[thread overview]
Message-ID: <56824CFD.9000903@ti.com> (raw)
In-Reply-To: <1451143726-28195-4-git-send-email-Julia.Lawall@lip6.fr>

[-- Attachment #1: Type: text/plain, Size: 1947 bytes --]


On 26/12/15 17:28, 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/)
> 
> // <smpl>
> @@
> identifier ret; expression e1,e2;
> @@
> (
> if (\(ret < 0\|ret != 0\))
>  { ... return ret; }
> |
> ret = 0
> )
> ... when != ret = e1
>     when != &ret
> *if(...)
> {
>   ... when != ret = e2
>       when forall
>  return ret;
> }
> // </smpl>
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
> 
> ---
>  drivers/video/fbdev/omap2/omapfb/displays/encoder-tpd12s015.c |   12 +++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/video/fbdev/omap2/omapfb/displays/encoder-tpd12s015.c b/drivers/video/fbdev/omap2/omapfb/displays/encoder-tpd12s015.c
> index 677e254..fc4cfa9 100644
> --- a/drivers/video/fbdev/omap2/omapfb/displays/encoder-tpd12s015.c
> +++ b/drivers/video/fbdev/omap2/omapfb/displays/encoder-tpd12s015.c
> @@ -241,22 +241,28 @@ static int tpd_probe(struct platform_device *pdev)
>  
>  	gpio = devm_gpiod_get_index_optional(&pdev->dev, NULL, 0,
>  		GPIOD_OUT_LOW);
> -	if (IS_ERR(gpio))
> +	if (IS_ERR(gpio)) {
> +		r = PTR_ERR(gpio);
>  		goto err_gpio;
> +	}
>  
>  	ddata->ct_cp_hpd_gpio = gpio;
>  
>  	gpio = devm_gpiod_get_index_optional(&pdev->dev, NULL, 1,
>  		GPIOD_OUT_LOW);
> -	if (IS_ERR(gpio))
> +	if (IS_ERR(gpio)) {
> +		r = PTR_ERR(gpio);
>  		goto err_gpio;
> +	}
>  
>  	ddata->ls_oe_gpio = gpio;
>  
>  	gpio = devm_gpiod_get_index(&pdev->dev, NULL, 2,
>  		GPIOD_IN);
> -	if (IS_ERR(gpio))
> +	if (IS_ERR(gpio)) {
> +		r = PTR_ERR(gpio);
>  		goto err_gpio;
> +	}
>  
>  	ddata->hpd_gpio = gpio;

Thanks. Looks like recent changes to the driver break the error
handling. I'll just drop those patches from my for-next branch, and let
the author fix the patches.

 Tomi


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: <kernel-janitors@vger.kernel.org>,
	Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
	<linux-omap@vger.kernel.org>, <linux-fbdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/7] omapfb: fix error return code
Date: Tue, 29 Dec 2015 11:06:05 +0200	[thread overview]
Message-ID: <56824CFD.9000903@ti.com> (raw)
In-Reply-To: <1451143726-28195-4-git-send-email-Julia.Lawall@lip6.fr>

[-- Attachment #1: Type: text/plain, Size: 1947 bytes --]


On 26/12/15 17:28, 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/)
> 
> // <smpl>
> @@
> identifier ret; expression e1,e2;
> @@
> (
> if (\(ret < 0\|ret != 0\))
>  { ... return ret; }
> |
> ret = 0
> )
> ... when != ret = e1
>     when != &ret
> *if(...)
> {
>   ... when != ret = e2
>       when forall
>  return ret;
> }
> // </smpl>
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
> 
> ---
>  drivers/video/fbdev/omap2/omapfb/displays/encoder-tpd12s015.c |   12 +++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/video/fbdev/omap2/omapfb/displays/encoder-tpd12s015.c b/drivers/video/fbdev/omap2/omapfb/displays/encoder-tpd12s015.c
> index 677e254..fc4cfa9 100644
> --- a/drivers/video/fbdev/omap2/omapfb/displays/encoder-tpd12s015.c
> +++ b/drivers/video/fbdev/omap2/omapfb/displays/encoder-tpd12s015.c
> @@ -241,22 +241,28 @@ static int tpd_probe(struct platform_device *pdev)
>  
>  	gpio = devm_gpiod_get_index_optional(&pdev->dev, NULL, 0,
>  		GPIOD_OUT_LOW);
> -	if (IS_ERR(gpio))
> +	if (IS_ERR(gpio)) {
> +		r = PTR_ERR(gpio);
>  		goto err_gpio;
> +	}
>  
>  	ddata->ct_cp_hpd_gpio = gpio;
>  
>  	gpio = devm_gpiod_get_index_optional(&pdev->dev, NULL, 1,
>  		GPIOD_OUT_LOW);
> -	if (IS_ERR(gpio))
> +	if (IS_ERR(gpio)) {
> +		r = PTR_ERR(gpio);
>  		goto err_gpio;
> +	}
>  
>  	ddata->ls_oe_gpio = gpio;
>  
>  	gpio = devm_gpiod_get_index(&pdev->dev, NULL, 2,
>  		GPIOD_IN);
> -	if (IS_ERR(gpio))
> +	if (IS_ERR(gpio)) {
> +		r = PTR_ERR(gpio);
>  		goto err_gpio;
> +	}
>  
>  	ddata->hpd_gpio = gpio;

Thanks. Looks like recent changes to the driver break the error
handling. I'll just drop those patches from my for-next branch, and let
the author fix the patches.

 Tomi


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2015-12-29  9:06 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-26 15:28 [PATCH 0/7] fix error return code Julia Lawall
2015-12-26 15:28 ` Julia Lawall
2015-12-26 15:28 ` Julia Lawall
2015-12-26 15:28 ` Julia Lawall
2015-12-26 15:28 ` [PATCH 1/7] umem: " Julia Lawall
2015-12-26 15:28   ` Julia Lawall
2015-12-26 15:28 ` [PATCH 2/7] gdrom: " Julia Lawall
2015-12-26 15:28   ` Julia Lawall
2015-12-26 15:28 ` [PATCH 3/7] omapfb: " Julia Lawall
2015-12-26 15:28   ` Julia Lawall
2015-12-29  9:06   ` Tomi Valkeinen [this message]
2015-12-29  9:06     ` Tomi Valkeinen
2015-12-29  9:06     ` Tomi Valkeinen
2015-12-26 15:28 ` [PATCH 4/7] usb: gadget: legacy: " Julia Lawall
2015-12-26 15:28   ` Julia Lawall
2015-12-26 15:28 ` [PATCH 5/7] rsxx: " Julia Lawall
2015-12-26 15:28   ` Julia Lawall
2015-12-26 15:28 ` [PATCH 6/7] drivers: net: cpsw: " Julia Lawall
2015-12-26 15:28   ` Julia Lawall
2015-12-26 17:36   ` Sergei Shtylyov
2015-12-26 17:36     ` Sergei Shtylyov
2015-12-26 17:40     ` Julia Lawall
2015-12-26 17:40       ` Julia Lawall
2015-12-26 17:50       ` Sergei Shtylyov
2015-12-26 17:50         ` Sergei Shtylyov
2015-12-26 19:12         ` [PATCH 6/7 v2] " Julia Lawall
2015-12-26 19:12           ` Julia Lawall
2015-12-26 19:51         ` [PATCH 6/7] " Sergei Shtylyov
2015-12-26 19:51           ` Sergei Shtylyov
2015-12-26 20:07           ` Julia Lawall
2015-12-26 20:07             ` Julia Lawall
2015-12-26 20:11             ` Sergei Shtylyov
2015-12-26 20:11               ` Sergei Shtylyov
2015-12-26 15:28 ` [PATCH 7/7] soc: ti: " Julia Lawall
2015-12-26 15:28   ` Julia Lawall
2015-12-26 15:28   ` Julia Lawall

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=56824CFD.9000903@ti.com \
    --to=tomi.valkeinen@ti.com \
    --cc=Julia.Lawall@lip6.fr \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=plagnioj@jcrosoft.com \
    /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.