From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: Antonino Daplas <adaplas@gmail.com>,
kernel-janitors@vger.kernel.org,
Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] i810: delete useless variable
Date: Tue, 14 Jan 2014 08:06:18 +0000 [thread overview]
Message-ID: <52D4EFFA.8090205@ti.com> (raw)
In-Reply-To: <1389629847-5330-3-git-send-email-Julia.Lawall@lip6.fr>
[-- Attachment #1: Type: text/plain, Size: 1218 bytes --]
On 2014-01-13 18:17, Julia Lawall wrote:
> From: Julia Lawall <Julia.Lawall@lip6.fr>
>
> Delete a variable that is at most only assigned to a constant, but never
> used otherwise.
>
> A simplified version of the semantic patch that fixes this problem is as
> follows: (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> type T;
> identifier i;
> constant c;
> @@
>
> -T i;
> <... when != i
> -i = c;
> ...>
> // </smpl>
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
>
> ---
> drivers/video/i810/i810_main.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/video/i810/i810_main.c b/drivers/video/i810/i810_main.c
> index 038192a..bb674e4 100644
> --- a/drivers/video/i810/i810_main.c
> +++ b/drivers/video/i810/i810_main.c
> @@ -2011,9 +2011,7 @@ static int i810fb_init_pci(struct pci_dev *dev,
> struct fb_info *info;
> struct i810fb_par *par = NULL;
> struct fb_videomode mode;
> - int i, err = -1, vfreq, hfreq, pixclock;
> -
> - i = 0;
> + int err = -1, vfreq, hfreq, pixclock;
>
> info = framebuffer_alloc(sizeof(struct i810fb_par), &dev->dev);
> if (!info)
>
Thanks, queued for 3.14.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: Antonino Daplas <adaplas@gmail.com>,
<kernel-janitors@vger.kernel.org>,
Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
<linux-fbdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/4] i810: delete useless variable
Date: Tue, 14 Jan 2014 10:06:18 +0200 [thread overview]
Message-ID: <52D4EFFA.8090205@ti.com> (raw)
In-Reply-To: <1389629847-5330-3-git-send-email-Julia.Lawall@lip6.fr>
[-- Attachment #1: Type: text/plain, Size: 1218 bytes --]
On 2014-01-13 18:17, Julia Lawall wrote:
> From: Julia Lawall <Julia.Lawall@lip6.fr>
>
> Delete a variable that is at most only assigned to a constant, but never
> used otherwise.
>
> A simplified version of the semantic patch that fixes this problem is as
> follows: (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> type T;
> identifier i;
> constant c;
> @@
>
> -T i;
> <... when != i
> -i = c;
> ...>
> // </smpl>
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
>
> ---
> drivers/video/i810/i810_main.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/video/i810/i810_main.c b/drivers/video/i810/i810_main.c
> index 038192a..bb674e4 100644
> --- a/drivers/video/i810/i810_main.c
> +++ b/drivers/video/i810/i810_main.c
> @@ -2011,9 +2011,7 @@ static int i810fb_init_pci(struct pci_dev *dev,
> struct fb_info *info;
> struct i810fb_par *par = NULL;
> struct fb_videomode mode;
> - int i, err = -1, vfreq, hfreq, pixclock;
> -
> - i = 0;
> + int err = -1, vfreq, hfreq, pixclock;
>
> info = framebuffer_alloc(sizeof(struct i810fb_par), &dev->dev);
> if (!info)
>
Thanks, queued for 3.14.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
next prev parent reply other threads:[~2014-01-14 8:06 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-13 15:22 [PATCH 0/4] delete useless variable Julia Lawall
2014-01-13 16:17 ` Julia Lawall
2014-01-13 16:17 ` Julia Lawall
2014-01-13 15:22 ` Julia Lawall
2014-01-13 15:22 ` [PATCH 2/4] i810: " Julia Lawall
2014-01-13 16:17 ` Julia Lawall
2014-01-13 15:22 ` Julia Lawall
2014-01-14 8:06 ` Tomi Valkeinen [this message]
2014-01-14 8:06 ` Tomi Valkeinen
2014-01-13 15:22 ` [PATCH 4/4] staging: tidspbridge: " Julia Lawall
2014-01-13 16:17 ` Julia Lawall
2014-01-13 15:48 ` Dan Carpenter
2014-01-13 15:48 ` Dan Carpenter
2014-01-13 15:23 ` [PATCH 3/4] brcmsmac: " Julia Lawall
2014-01-13 16:17 ` Julia Lawall
2014-01-13 15:23 ` [PATCH 1/4] ksz884x: " Julia Lawall
2014-01-13 16:17 ` Julia Lawall
2014-01-15 21:43 ` David Miller
2014-01-15 21:43 ` 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=52D4EFFA.8090205@ti.com \
--to=tomi.valkeinen@ti.com \
--cc=Julia.Lawall@lip6.fr \
--cc=adaplas@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@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.