All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Julia Lawall <Julia.Lawall@lip6.fr>,
	Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: kernel-janitors@vger.kernel.org, linux-fbdev@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Subject: Re: [PATCH 14/14] video: of: display_timing: delete unneeded test before of_node_put
Date: Tue, 26 Aug 2014 10:36:00 +0000	[thread overview]
Message-ID: <53FC6310.9030901@ti.com> (raw)
In-Reply-To: <1407492475-26283-14-git-send-email-Julia.Lawall@lip6.fr>

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

On 08/08/14 13:07, Julia Lawall wrote:
> From: Julia Lawall <Julia.Lawall@lip6.fr>
> 
> Of_node_put supports NULL as its argument, so the initial test is not
> necessary.  Furthermore, native_mode cannot be NULL at this point.
> 
> Suggested by Uwe Kleine-König.
> 
> The semantic patch that fixes this problem is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @@
> expression e;
> @@
> 
> -if (e)
>    of_node_put(e);
> // </smpl>
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
> 
> ---
>  drivers/video/of_display_timing.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/video/of_display_timing.c b/drivers/video/of_display_timing.c
> index 987edf1..339f831 100644
> --- a/drivers/video/of_display_timing.c
> +++ b/drivers/video/of_display_timing.c
> @@ -233,8 +233,7 @@ struct display_timings *of_get_display_timings(struct device_node *np)
>  	return disp;
>  
>  timingfail:
> -	if (native_mode)
> -		of_node_put(native_mode);
> +	of_node_put(native_mode);
>  	display_timings_release(disp);
>  entryfail:
>  	kfree(disp);
> 

Thanks, queued for 3.18.

 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>,
	Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: kernel-janitors@vger.kernel.org, linux-fbdev@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Subject: Re: [PATCH 14/14] video: of: display_timing: delete unneeded test before of_node_put
Date: Tue, 26 Aug 2014 13:36:00 +0300	[thread overview]
Message-ID: <53FC6310.9030901@ti.com> (raw)
In-Reply-To: <1407492475-26283-14-git-send-email-Julia.Lawall@lip6.fr>

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

On 08/08/14 13:07, Julia Lawall wrote:
> From: Julia Lawall <Julia.Lawall@lip6.fr>
> 
> Of_node_put supports NULL as its argument, so the initial test is not
> necessary.  Furthermore, native_mode cannot be NULL at this point.
> 
> Suggested by Uwe Kleine-König.
> 
> The semantic patch that fixes this problem is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @@
> expression e;
> @@
> 
> -if (e)
>    of_node_put(e);
> // </smpl>
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
> 
> ---
>  drivers/video/of_display_timing.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/video/of_display_timing.c b/drivers/video/of_display_timing.c
> index 987edf1..339f831 100644
> --- a/drivers/video/of_display_timing.c
> +++ b/drivers/video/of_display_timing.c
> @@ -233,8 +233,7 @@ struct display_timings *of_get_display_timings(struct device_node *np)
>  	return disp;
>  
>  timingfail:
> -	if (native_mode)
> -		of_node_put(native_mode);
> +	of_node_put(native_mode);
>  	display_timings_release(disp);
>  entryfail:
>  	kfree(disp);
> 

Thanks, queued for 3.18.

 Tomi



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

  reply	other threads:[~2014-08-26 10:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-08 10:07 =?UTF-8?q?=5BPATCH=2014/14=5D=20video=3A=20of=3A=20display=5Ftiming=3A=20delete=20unneeded=20test=20 Julia Lawall
2014-08-08 10:07 ` [PATCH 14/14] video: of: display_timing: delete unneeded test before of_node_put Julia Lawall
2014-08-08 10:07 ` =?UTF-8?q?=5BPATCH=2014/14=5D=20video=3A=20of=3A=20display=5Ftiming=3A=20delete=20unneeded=20test=20 Julia Lawall
2014-08-26 10:36 ` Tomi Valkeinen [this message]
2014-08-26 10:36   ` [PATCH 14/14] video: of: display_timing: delete unneeded test before of_node_put Tomi Valkeinen

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=53FC6310.9030901@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=plagnioj@jcrosoft.com \
    --cc=u.kleine-koenig@pengutronix.de \
    /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.