ASoC: rsnd: cleanup ppcheck warning for core.c
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Thu, 25 Feb 2021 00:25:14 +0000 (09:25 +0900)
committerMark Brown <broonie@kernel.org>
Wed, 10 Mar 2021 13:07:11 +0000 (13:07 +0000)
commite539943c664e58a7005959f2c902d1fbda464b59
tree529b26c12a40f902c30e21b02fbc4a03806c7fec
parent0779baa812cf27325ad1d43a917144f50ffd2142
ASoC: rsnd: cleanup ppcheck warning for core.c

This patch cleanups below ppcheck warning.

sound/soc/sh/rcar/core.c:233:26: style: The scope of the variable 'io' can be reduced. [variableScope]
 struct rsnd_dai_stream *io;
                         ^
sound/soc/sh/rcar/core.c:489:19: style: The scope of the variable 'mod' can be reduced. [variableScope]
 struct rsnd_mod *mod;
                  ^
sound/soc/sh/rcar/core.c:1064:9: style: The scope of the variable 'j' can be reduced. [variableScope]
 int i, j;
        ^
sound/soc/sh/rcar/core.c:1143:19: style: The scope of the variable 'mod' can be reduced. [variableScope]
 struct rsnd_mod *mod;
                  ^
sound/soc/sh/rcar/core.c:1261:22: style: The scope of the variable 'playback' can be reduced. [variableScope]
 struct device_node *playback, *capture;
                     ^
sound/soc/sh/rcar/core.c:1261:33: style: The scope of the variable 'capture' can be reduced. [variableScope]
 struct device_node *playback, *capture;
                                ^
sound/soc/sh/rcar/core.c:1419:29: style: The scope of the variable 'be_params' can be reduced. [variableScope]
  struct snd_pcm_hw_params *be_params;
                            ^
sound/soc/sh/rcar/core.c:1369:22: style: Local variable 'rdai' shadows outer variable [shadowVariable]
    struct rsnd_dai *rdai = rsnd_rdai_get(priv, dai_i);
                     ^
sound/soc/sh/rcar/core.c:1338:19: note: Shadowed declaration
 struct rsnd_dai *rdai;
                  ^
sound/soc/sh/rcar/core.c:1369:22: note: Shadow variable
    struct rsnd_dai *rdai = rsnd_rdai_get(priv, dai_i);
                     ^
sound/soc/sh/rcar/core.c:1380:22: style: Local variable 'rdai' shadows outer variable [shadowVariable]
    struct rsnd_dai *rdai = rsnd_rdai_get(priv, dai_i);
                     ^

Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87im6hro2d.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sh/rcar/core.c