All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][V2] speakup: remove redundant assignment of variable i
@ 2021-11-10 23:33 Colin Ian King
  2021-11-10 23:35 ` Samuel Thibault
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2021-11-10 23:33 UTC (permalink / raw)
  To: William Hubbs, Chris Brannon, Kirk Reiser, Samuel Thibault,
	Greg Kroah-Hartman, speakup
  Cc: kernel-janitors, linux-kernel

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.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
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(-)

diff --git a/drivers/accessibility/speakup/speakup_acntpc.c b/drivers/accessibility/speakup/speakup_acntpc.c
index c1ec087dca13..023172ca22ef 100644
--- a/drivers/accessibility/speakup/speakup_acntpc.c
+++ b/drivers/accessibility/speakup/speakup_acntpc.c
@@ -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) {
diff --git a/drivers/accessibility/speakup/speakup_dtlk.c b/drivers/accessibility/speakup/speakup_dtlk.c
index 92838d3ae9eb..a9dd5c45d237 100644
--- a/drivers/accessibility/speakup/speakup_dtlk.c
+++ b/drivers/accessibility/speakup/speakup_dtlk.c
@@ -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");
diff --git a/drivers/accessibility/speakup/speakup_keypc.c b/drivers/accessibility/speakup/speakup_keypc.c
index 311f4aa0be22..1618be87bff1 100644
--- a/drivers/accessibility/speakup/speakup_keypc.c
+++ b/drivers/accessibility/speakup/speakup_keypc.c
@@ -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) {
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH][V2] speakup: remove redundant assignment of variable i
  2021-11-10 23:33 [PATCH][V2] speakup: remove redundant assignment of variable i Colin Ian King
@ 2021-11-10 23:35 ` Samuel Thibault
  0 siblings, 0 replies; 2+ messages in thread
From: Samuel Thibault @ 2021-11-10 23:35 UTC (permalink / raw)
  To: Colin Ian King
  Cc: William Hubbs, Chris Brannon, Kirk Reiser, Greg Kroah-Hartman,
	speakup, kernel-janitors, linux-kernel

Colin Ian King, le mer. 10 nov. 2021 23:33:42 +0000, a ecrit:
> 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.
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>

Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>

> ---
> 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(-)
> 
> diff --git a/drivers/accessibility/speakup/speakup_acntpc.c b/drivers/accessibility/speakup/speakup_acntpc.c
> index c1ec087dca13..023172ca22ef 100644
> --- a/drivers/accessibility/speakup/speakup_acntpc.c
> +++ b/drivers/accessibility/speakup/speakup_acntpc.c
> @@ -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) {
> diff --git a/drivers/accessibility/speakup/speakup_dtlk.c b/drivers/accessibility/speakup/speakup_dtlk.c
> index 92838d3ae9eb..a9dd5c45d237 100644
> --- a/drivers/accessibility/speakup/speakup_dtlk.c
> +++ b/drivers/accessibility/speakup/speakup_dtlk.c
> @@ -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");
> diff --git a/drivers/accessibility/speakup/speakup_keypc.c b/drivers/accessibility/speakup/speakup_keypc.c
> index 311f4aa0be22..1618be87bff1 100644
> --- a/drivers/accessibility/speakup/speakup_keypc.c
> +++ b/drivers/accessibility/speakup/speakup_keypc.c
> @@ -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) {
> -- 
> 2.32.0
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-10 23:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-10 23:33 [PATCH][V2] speakup: remove redundant assignment of variable i Colin Ian King
2021-11-10 23:35 ` Samuel Thibault

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.