Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1441046 > unrolled thread

[PATCH v2] sound: oss: Remove useless initialisation

Started byAmitoj Kaur Chawla <amitoj1606@gmail.com>
First post2016-07-12 05:30 +0200
Last post2016-07-12 08:20 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v2] sound: oss: Remove useless initialisation Amitoj Kaur Chawla <amitoj1606@gmail.com> - 2016-07-12 05:30 +0200
    Re: [PATCH v2] sound: oss: Remove useless initialisation Takashi Iwai <tiwai@suse.de> - 2016-07-12 08:20 +0200

#1441046 — [PATCH v2] sound: oss: Remove useless initialisation

FromAmitoj Kaur Chawla <amitoj1606@gmail.com>
Date2016-07-12 05:30 +0200
Subject[PATCH v2] sound: oss: Remove useless initialisation
Message-ID<rTWyt-7Ks-1@gated-at.bofh.it>
Remove useless initialisation of variable whose value is reinitialised
later.

The Coccinelle semantic patch used to make this change is as follows:
@@
type T;
identifier x;
constant C;
expression e;
@@

T x
- = C
 ;
x = e;

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
---
Changes in v2:
        -Modify commit message
 sound/oss/ad1848.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/oss/ad1848.c b/sound/oss/ad1848.c
index 10c8de1..6368e5c 100644
--- a/sound/oss/ad1848.c
+++ b/sound/oss/ad1848.c
@@ -254,7 +254,7 @@ static void ad_write(ad1848_info * devc, int reg, int data)
 
 static void wait_for_calibration(ad1848_info * devc)
 {
-	int timeout = 0;
+	int timeout;
 
 	/*
 	 * Wait until the auto calibration process has finished.
-- 
1.9.1

[toc] | [next] | [standalone]


#1441082

FromTakashi Iwai <tiwai@suse.de>
Date2016-07-12 08:20 +0200
Message-ID<rTZcZ-178-7@gated-at.bofh.it>
In reply to#1441046
On Tue, 12 Jul 2016 05:24:35 +0200,
Amitoj Kaur Chawla wrote:
> 
> Remove useless initialisation of variable whose value is reinitialised
> later.
> 
> The Coccinelle semantic patch used to make this change is as follows:
> @@
> type T;
> identifier x;
> constant C;
> expression e;
> @@
> 
> T x
> - = C
>  ;
> x = e;
> 
> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
> ---
> Changes in v2:
>         -Modify commit message

Applied, thanks.


Takashi

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web