diff mbox series

ALSA: caiaq: Fix unused variable warning

Message ID 20240809074254.5290-1-tiwai@suse.de (mailing list archive)
State New, archived
Headers show
Series ALSA: caiaq: Fix unused variable warning | expand

Commit Message

Takashi Iwai Aug. 9, 2024, 7:42 a.m. UTC
The recent cleanup of caiaq driver forgot to remove the unused loop
variable:
sound/usb/caiaq/audio.c: In function 'snd_usb_caiaq_pcm_prepare':
sound/usb/caiaq/audio.c:179:41: error: unused variable 'i' [-Werror=unused-variable]

Fixes: e95b9f7f2ee0 ("ALSA: snd-usb-caiaq: use snd_pcm_rate_to_rate_bit")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Closes: https://lore.kernel.org/20240809112252.5af8025f@canb.auug.org.au
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/usb/caiaq/audio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jerome Brunet Aug. 9, 2024, 7:46 a.m. UTC | #1
On Fri 09 Aug 2024 at 09:42, Takashi Iwai <tiwai@suse.de> wrote:

> The recent cleanup of caiaq driver forgot to remove the unused loop
> variable:
> sound/usb/caiaq/audio.c: In function 'snd_usb_caiaq_pcm_prepare':
> sound/usb/caiaq/audio.c:179:41: error: unused variable 'i' [-Werror=unused-variable]
>
> Fixes: e95b9f7f2ee0 ("ALSA: snd-usb-caiaq: use snd_pcm_rate_to_rate_bit")
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Closes: https://lore.kernel.org/20240809112252.5af8025f@canb.auug.org.au
> Signed-off-by: Takashi Iwai <tiwai@suse.de>

Urgh, sorry about that. Thanks for taking care of it.

> ---
>  sound/usb/caiaq/audio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/usb/caiaq/audio.c b/sound/usb/caiaq/audio.c
> index e62a4ea1d19c..772c0ecb7077 100644
> --- a/sound/usb/caiaq/audio.c
> +++ b/sound/usb/caiaq/audio.c
> @@ -176,7 +176,7 @@ static int snd_usb_caiaq_pcm_hw_free(struct snd_pcm_substream *sub)
>  
>  static int snd_usb_caiaq_pcm_prepare(struct snd_pcm_substream *substream)
>  {
> -	int bytes_per_sample, bpp, ret, i;
> +	int bytes_per_sample, bpp, ret;
>  	int index = substream->number;
>  	struct snd_usb_caiaqdev *cdev = snd_pcm_substream_chip(substream);
>  	struct snd_pcm_runtime *runtime = substream->runtime;
diff mbox series

Patch

diff --git a/sound/usb/caiaq/audio.c b/sound/usb/caiaq/audio.c
index e62a4ea1d19c..772c0ecb7077 100644
--- a/sound/usb/caiaq/audio.c
+++ b/sound/usb/caiaq/audio.c
@@ -176,7 +176,7 @@  static int snd_usb_caiaq_pcm_hw_free(struct snd_pcm_substream *sub)
 
 static int snd_usb_caiaq_pcm_prepare(struct snd_pcm_substream *substream)
 {
-	int bytes_per_sample, bpp, ret, i;
+	int bytes_per_sample, bpp, ret;
 	int index = substream->number;
 	struct snd_usb_caiaqdev *cdev = snd_pcm_substream_chip(substream);
 	struct snd_pcm_runtime *runtime = substream->runtime;