Skip to contentSkip to conversation

speakup: remove redundant assignment of variable i

PATCH In review Colin Ian King 2 participants 2 messages Nov 10, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 speakup: remove redundant assignment of variable i

The variable i is being initialized a value that is never read, it is re-assigned later on in a for-loop. The assignment is redundant and can be removed.

---
V2: Use correct SoB

---
 drivers/accessibility/speakup/speakup_acntpc.c | 2 +-
 drivers/accessibility/speakup/speakup_dtlk.c   | 2 +-
 drivers/accessibility/speakup/speakup_keypc.c  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/accessibility/speakup/speakup_acntpc.c +1 -1
index c1ec087dca13..023172ca22ef 100644
@@ -247,7 +247,7 @@ static void synth_flush(struct spk_synth *synth)
 static int synth_probe(struct spk_synth *synth)
 {
 	unsigned int port_val = 0;
-	int i = 0;
+	int i;
 
 	pr_info("Probing for %s.\n", synth->long_name);
 	if (port_forced) {
drivers/accessibility/speakup/speakup_dtlk.c +1 -1
index 92838d3ae9eb..a9dd5c45d237 100644
@@ -316,7 +316,7 @@ static struct synth_settings *synth_interrogate(struct spk_synth *synth)
 static int synth_probe(struct spk_synth *synth)
 {
 	unsigned int port_val = 0;
-	int i = 0;
+	int i;
 	struct synth_settings *sp;
 
 	pr_info("Probing for DoubleTalk.\n");
drivers/accessibility/speakup/speakup_keypc.c +1 -1
index 311f4aa0be22..1618be87bff1 100644
@@ -254,7 +254,7 @@ static void synth_flush(struct spk_synth *synth)
 static int synth_probe(struct spk_synth *synth)
 {
 	unsigned int port_val = 0;
-	int i = 0;
+	int i;
 
 	pr_info("Probing for %s.\n", synth->long_name);
 	if (port_forced) {
Signature · 1 line
2.32.0
maintainer Reviewed-by on v2 1/1
#1 lore raw

Colin Ian King, le mer. 10 nov. 2021 23:33:42 +0000, a ecrit:

Quoted 5 lines

The variable i is being initialized a value that is never read, it is re-assigned later on in a for-loop. The assignment is redundant and can be removed.

Quoted 50 lines

---
V2: Use correct SoB

---
 drivers/accessibility/speakup/speakup_acntpc.c | 2 +-
 drivers/accessibility/speakup/speakup_dtlk.c   | 2 +-
 drivers/accessibility/speakup/speakup_keypc.c  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/accessibility/speakup/speakup_acntpc.c +1 -1
index c1ec087dca13..023172ca22ef 100644
@@ -247,7 +247,7 @@ static void synth_flush(struct spk_synth *synth)
 static int synth_probe(struct spk_synth *synth)
 {
 	unsigned int port_val = 0;
-	int i = 0;
+	int i;
 
 	pr_info("Probing for %s.\n", synth->long_name);
 	if (port_forced) {
drivers/accessibility/speakup/speakup_dtlk.c +1 -1
index 92838d3ae9eb..a9dd5c45d237 100644
@@ -316,7 +316,7 @@ static struct synth_settings *synth_interrogate(struct spk_synth *synth)
 static int synth_probe(struct spk_synth *synth)
 {
 	unsigned int port_val = 0;
-	int i = 0;
+	int i;
 	struct synth_settings *sp;
 
 	pr_info("Probing for DoubleTalk.\n");
drivers/accessibility/speakup/speakup_keypc.c +1 -1
index 311f4aa0be22..1618be87bff1 100644
@@ -254,7 +254,7 @@ static void synth_flush(struct spk_synth *synth)
 static int synth_probe(struct spk_synth *synth)
 {
 	unsigned int port_val = 0;
-	int i = 0;
+	int i;
 
 	pr_info("Probing for %s.\n", synth->long_name);
 	if (port_forced) {
Signature · 1 line
2.32.0