All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: usb-audio: remove redundant assignment to variable c
@ 2022-02-07 14:06 Colin Ian King
  2022-02-07 16:10   ` Takashi Iwai
  0 siblings, 1 reply; 3+ messages in thread
From: Colin Ian King @ 2022-02-07 14:06 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, alsa-devel; +Cc: kernel-janitors, linux-kernel

The variable c is being initialized in an outer for-loop and also
re-initialized inside an inner for-loop. The first initialization
is redundant and can be removed.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 sound/usb/mixer_s1810c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/usb/mixer_s1810c.c b/sound/usb/mixer_s1810c.c
index 0255089c9efb..fac4bbc6b275 100644
--- a/sound/usb/mixer_s1810c.c
+++ b/sound/usb/mixer_s1810c.c
@@ -221,7 +221,7 @@ static int snd_s1810c_init_mixer_maps(struct snd_usb_audio *chip)
 	e = 0xbc;
 	for (n = 0; n < 2; n++) {
 		off = n * 18;
-		for (b = off, c = 0; b < 18 + off; b++) {
+		for (b = off; b < 18 + off; b++) {
 			/* This channel to all outputs ? */
 			for (c = 0; c <= 8; c++) {
 				snd_s1810c_send_ctl_packet(dev, a, b, c, 0, e);
-- 
2.34.1


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

* Re: [PATCH] ALSA: usb-audio: remove redundant assignment to variable c
  2022-02-07 14:06 [PATCH] ALSA: usb-audio: remove redundant assignment to variable c Colin Ian King
@ 2022-02-07 16:10   ` Takashi Iwai
  0 siblings, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2022-02-07 16:10 UTC (permalink / raw)
  To: Colin Ian King; +Cc: linux-kernel, alsa-devel, kernel-janitors, Takashi Iwai

On Mon, 07 Feb 2022 15:06:17 +0100,
Colin Ian King wrote:
> 
> The variable c is being initialized in an outer for-loop and also
> re-initialized inside an inner for-loop. The first initialization
> is redundant and can be removed.
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>

The code change looks OK, but when I apply your patch now, git-am
converts the Author address to your new @intel.com, and this
mismatches with the address in Signed-off-by.  Should I keep the
original gmail address, or would you fix up your Signed-off-by (and
From) for avoiding those inconsistency?


thanks,

Takashi

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

* Re: [PATCH] ALSA: usb-audio: remove redundant assignment to variable c
@ 2022-02-07 16:10   ` Takashi Iwai
  0 siblings, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2022-02-07 16:10 UTC (permalink / raw)
  To: Colin Ian King
  Cc: Jaroslav Kysela, Takashi Iwai, alsa-devel, kernel-janitors,
	linux-kernel

On Mon, 07 Feb 2022 15:06:17 +0100,
Colin Ian King wrote:
> 
> The variable c is being initialized in an outer for-loop and also
> re-initialized inside an inner for-loop. The first initialization
> is redundant and can be removed.
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>

The code change looks OK, but when I apply your patch now, git-am
converts the Author address to your new @intel.com, and this
mismatches with the address in Signed-off-by.  Should I keep the
original gmail address, or would you fix up your Signed-off-by (and
From) for avoiding those inconsistency?


thanks,

Takashi

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

end of thread, other threads:[~2022-02-07 16:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-07 14:06 [PATCH] ALSA: usb-audio: remove redundant assignment to variable c Colin Ian King
2022-02-07 16:10 ` Takashi Iwai
2022-02-07 16:10   ` Takashi Iwai

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.