From: kgene@kernel.org
To: linux-arm-kernel@lists.infradead.org
Subject: RE: [PATCH] arch/arm/mach-s3c24xx/mach-h1940.c: delete double assignment
Date: Fri, 14 Sep 2012 04:03:12 +0000 [thread overview]
Message-ID: <01a201cd922d$dc49a550$94dceff0$@org> (raw)
In-Reply-To: <1347478135-744-1-git-send-email-Julia.Lawall@lip6.fr>
Julia Lawall wrote:
>
> From: Julia Lawall <Julia.Lawall@lip6.fr>
>
> Delete successive assignments to the same location.
>
> A simplified version of the semantic match that finds this problem is as
> follows: (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> expression i;
> @@
>
> *i = ...;
> i = ...;
> // </smpl>
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
>
> ---
> Not compiled, and this may change the behavior of the code. Without this
> change, check_gpio2 could possibly be used uninitialized later.
>
> arch/arm/mach-s3c24xx/mach-h1940.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-
> s3c24xx/mach-h1940.c
> index bb8d008..477778c 100644
> --- a/arch/arm/mach-s3c24xx/mach-h1940.c
> +++ b/arch/arm/mach-s3c24xx/mach-h1940.c
> @@ -380,7 +380,7 @@ int h1940_led_blink_set(unsigned gpio, int state,
> default:
> blink_gpio = S3C2410_GPA(3);
> check_gpio1 = S3C2410_GPA(1);
> - check_gpio1 = S3C2410_GPA(7);
> + check_gpio2 = S3C2410_GPA(7);
> break;
> }
>
Applied, thanks.
K-Gene <kgene@kernel.org>
WARNING: multiple messages have this Message-ID (diff)
From: kgene@kernel.org
To: 'Julia Lawall' <Julia.Lawall@lip6.fr>, 'Ben Dooks' <ben-linux@fluff.org>
Cc: kernel-janitors@vger.kernel.org,
'Russell King' <linux@arm.linux.org.uk>,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: RE: [PATCH] arch/arm/mach-s3c24xx/mach-h1940.c: delete double assignment
Date: Fri, 14 Sep 2012 13:03:12 +0900 [thread overview]
Message-ID: <01a201cd922d$dc49a550$94dceff0$@org> (raw)
In-Reply-To: <1347478135-744-1-git-send-email-Julia.Lawall@lip6.fr>
Julia Lawall wrote:
>
> From: Julia Lawall <Julia.Lawall@lip6.fr>
>
> Delete successive assignments to the same location.
>
> A simplified version of the semantic match that finds this problem is as
> follows: (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> expression i;
> @@
>
> *i = ...;
> i = ...;
> // </smpl>
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
>
> ---
> Not compiled, and this may change the behavior of the code. Without this
> change, check_gpio2 could possibly be used uninitialized later.
>
> arch/arm/mach-s3c24xx/mach-h1940.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-
> s3c24xx/mach-h1940.c
> index bb8d008..477778c 100644
> --- a/arch/arm/mach-s3c24xx/mach-h1940.c
> +++ b/arch/arm/mach-s3c24xx/mach-h1940.c
> @@ -380,7 +380,7 @@ int h1940_led_blink_set(unsigned gpio, int state,
> default:
> blink_gpio = S3C2410_GPA(3);
> check_gpio1 = S3C2410_GPA(1);
> - check_gpio1 = S3C2410_GPA(7);
> + check_gpio2 = S3C2410_GPA(7);
> break;
> }
>
Applied, thanks.
K-Gene <kgene@kernel.org>
WARNING: multiple messages have this Message-ID (diff)
From: kgene@kernel.org (kgene at kernel.org)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arch/arm/mach-s3c24xx/mach-h1940.c: delete double assignment
Date: Fri, 14 Sep 2012 13:03:12 +0900 [thread overview]
Message-ID: <01a201cd922d$dc49a550$94dceff0$@org> (raw)
In-Reply-To: <1347478135-744-1-git-send-email-Julia.Lawall@lip6.fr>
Julia Lawall wrote:
>
> From: Julia Lawall <Julia.Lawall@lip6.fr>
>
> Delete successive assignments to the same location.
>
> A simplified version of the semantic match that finds this problem is as
> follows: (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> expression i;
> @@
>
> *i = ...;
> i = ...;
> // </smpl>
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
>
> ---
> Not compiled, and this may change the behavior of the code. Without this
> change, check_gpio2 could possibly be used uninitialized later.
>
> arch/arm/mach-s3c24xx/mach-h1940.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-
> s3c24xx/mach-h1940.c
> index bb8d008..477778c 100644
> --- a/arch/arm/mach-s3c24xx/mach-h1940.c
> +++ b/arch/arm/mach-s3c24xx/mach-h1940.c
> @@ -380,7 +380,7 @@ int h1940_led_blink_set(unsigned gpio, int state,
> default:
> blink_gpio = S3C2410_GPA(3);
> check_gpio1 = S3C2410_GPA(1);
> - check_gpio1 = S3C2410_GPA(7);
> + check_gpio2 = S3C2410_GPA(7);
> break;
> }
>
Applied, thanks.
K-Gene <kgene@kernel.org>
next prev parent reply other threads:[~2012-09-14 4:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-12 19:28 [PATCH] arch/arm/mach-s3c24xx/mach-h1940.c: delete double assignment Julia Lawall
2012-09-12 19:28 ` Julia Lawall
2012-09-12 19:28 ` Julia Lawall
2012-09-14 4:03 ` kgene [this message]
2012-09-14 4:03 ` kgene at kernel.org
2012-09-14 4:03 ` kgene
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='01a201cd922d$dc49a550$94dceff0$@org' \
--to=kgene@kernel.org \
--cc=linux-arm-kernel@lists.infradead.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.