]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ALSA: sh: Fix unused variable warnings
authorTakashi Iwai <tiwai@suse.de>
Sat, 4 Jan 2020 11:00:57 +0000 (12:00 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Feb 2020 07:36:42 +0000 (08:36 +0100)
[ Upstream commit 5da116f164ce265e397b8f59af5c39e4a61d61a5 ]

Remove unused variables that are left over after the conversion of new
PCM ops:
  sound/sh/sh_dac_audio.c:166:26: warning: unused variable 'runtime'
  sound/sh/sh_dac_audio.c:186:26: warning: unused variable 'runtime'
  sound/sh/sh_dac_audio.c:205:26: warning: unused variable 'runtime'

Fixes: 1cc2f8ba0b3e ("ALSA: sh: Convert to the new PCM ops")
Link: https://lore.kernel.org/r/20200104110057.13875-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/sh/sh_dac_audio.c

index ed877a138965dc632c58dab8073e6a9aa6e41b62..7c46494466ff1234f2c7b93779f92f69ea8a88d2 100644 (file)
@@ -175,7 +175,6 @@ static int snd_sh_dac_pcm_copy(struct snd_pcm_substream *substream,
 {
        /* channel is not used (interleaved data) */
        struct snd_sh_dac *chip = snd_pcm_substream_chip(substream);
-       struct snd_pcm_runtime *runtime = substream->runtime;
 
        if (copy_from_user_toio(chip->data_buffer + pos, src, count))
                return -EFAULT;
@@ -195,7 +194,6 @@ static int snd_sh_dac_pcm_copy_kernel(struct snd_pcm_substream *substream,
 {
        /* channel is not used (interleaved data) */
        struct snd_sh_dac *chip = snd_pcm_substream_chip(substream);
-       struct snd_pcm_runtime *runtime = substream->runtime;
 
        memcpy_toio(chip->data_buffer + pos, src, count);
        chip->buffer_end = chip->data_buffer + pos + count;
@@ -214,7 +212,6 @@ static int snd_sh_dac_pcm_silence(struct snd_pcm_substream *substream,
 {
        /* channel is not used (interleaved data) */
        struct snd_sh_dac *chip = snd_pcm_substream_chip(substream);
-       struct snd_pcm_runtime *runtime = substream->runtime;
 
        memset_io(chip->data_buffer + pos, 0, count);
        chip->buffer_end = chip->data_buffer + pos + count;