diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2021-08-16 06:56:01 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-08-16 14:29:31 +0200 |
commit | d490f4e73e3c0b217242d92a8f679e62dc657001 (patch) | |
tree | 610816a382147bfe84f348d04ff24fb021caf9ec /sound/soc/soc-dai.c | |
parent | ASoC: soc-generic-dmaengine-pcm: cleanup cppcheck warning at dmaengine_copy_u... (diff) | |
download | linux-d490f4e73e3c0b217242d92a8f679e62dc657001.tar.xz linux-d490f4e73e3c0b217242d92a8f679e62dc657001.zip |
ASoC: soc-dai: cleanup cppcheck warning at snd_soc_dai_link_set_capabilities()
This patch cleanups below cppcheck warning.
sound/soc/soc-dai.c:454:7: style: The scope of the variable 'supported_cpu' can be reduced. [variableScope]
bool supported_cpu;
^
sound/soc/soc-dai.c:455:7: style: The scope of the variable 'supported_codec' can be reduced. [variableScope]
bool supported_codec;
^
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87y292yom6.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-dai.c')
-rw-r--r-- | sound/soc/soc-dai.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/sound/soc/soc-dai.c b/sound/soc/soc-dai.c index a56dcc8d6fb7..a4e1c27a4ed2 100644 --- a/sound/soc/soc-dai.c +++ b/sound/soc/soc-dai.c @@ -492,18 +492,16 @@ bool snd_soc_dai_stream_valid(struct snd_soc_dai *dai, int dir) */ void snd_soc_dai_link_set_capabilities(struct snd_soc_dai_link *dai_link) { - struct snd_soc_dai_link_component *cpu; - struct snd_soc_dai_link_component *codec; - struct snd_soc_dai *dai; bool supported[SNDRV_PCM_STREAM_LAST + 1]; - bool supported_cpu; - bool supported_codec; int direction; - int i; for_each_pcm_streams(direction) { - supported_cpu = false; - supported_codec = false; + struct snd_soc_dai_link_component *cpu; + struct snd_soc_dai_link_component *codec; + struct snd_soc_dai *dai; + bool supported_cpu = false; + bool supported_codec = false; + int i; for_each_link_cpus(dai_link, i, cpu) { dai = snd_soc_find_dai_with_mutex(cpu); |