ASoC: rsnd: cleanup ppcheck warning for cmd.c

This patch cleanups below ppcheck warning.

sound/soc/sh/rcar/cmd.c:46:20: style: The scope of the variable 'src' can be reduced. [variableScope]
  struct rsnd_mod *src;
                   ^
sound/soc/sh/rcar/cmd.c:47:27: style: The scope of the variable 'tio' can be reduced. [variableScope]
  struct rsnd_dai_stream *tio;
                          ^
sound/soc/sh/rcar/cmd.c:145:13: style: The scope of the variable 'ret' can be reduced. [variableScope]
 int i, nr, ret;
            ^

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87h7m1ro28.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Kuninori Morimoto 2021-02-25 09:25:19 +09:00 committed by Mark Brown
parent e539943c66
commit 31dbf7acc6
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 7 additions and 8 deletions

View File

@ -43,8 +43,6 @@ static int rsnd_cmd_init(struct rsnd_mod *mod,
if (mix) {
struct rsnd_dai *rdai;
struct rsnd_mod *src;
struct rsnd_dai_stream *tio;
int i;
/*
@ -54,8 +52,9 @@ static int rsnd_cmd_init(struct rsnd_mod *mod,
*/
data = 0;
for_each_rsnd_dai(rdai, priv, i) {
tio = &rdai->playback;
src = rsnd_io_to_mod_src(tio);
struct rsnd_dai_stream *tio = &rdai->playback;
struct rsnd_mod *src = rsnd_io_to_mod_src(tio);
if (mix == rsnd_io_to_mod_mix(tio))
data |= path[rsnd_mod_id(src)];
@ -142,7 +141,7 @@ int rsnd_cmd_probe(struct rsnd_priv *priv)
{
struct device *dev = rsnd_priv_to_dev(priv);
struct rsnd_cmd *cmd;
int i, nr, ret;
int i, nr;
/* This driver doesn't support Gen1 at this point */
if (rsnd_is_gen1(priv))
@ -161,9 +160,9 @@ int rsnd_cmd_probe(struct rsnd_priv *priv)
priv->cmd = cmd;
for_each_rsnd_cmd(cmd, priv, i) {
ret = rsnd_mod_init(priv, rsnd_mod_get(cmd),
&rsnd_cmd_ops, NULL,
RSND_MOD_CMD, i);
int ret = rsnd_mod_init(priv, rsnd_mod_get(cmd),
&rsnd_cmd_ops, NULL,
RSND_MOD_CMD, i);
if (ret)
return ret;
}