[PATCH 4/8] ASoC: sh: rcar: core: rename shadowing variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



cppcheck warnings:

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);
                     ^
sound/soc/sh/rcar/core.c:1338:19: note: Shadowed declaration
 struct rsnd_dai *rdai;
                  ^
sound/soc/sh/rcar/core.c:1380:22: note: Shadow variable
    struct rsnd_dai *rdai = rsnd_rdai_get(priv, dai_i);

use a different name at lower scope.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxxxxxxxx>
---
 sound/soc/sh/rcar/core.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index b1a75509851a..817eea79e0d2 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -1366,10 +1366,10 @@ static int rsnd_dai_probe(struct rsnd_priv *priv)
 		for_each_endpoint_of_node(dai_node, dai_np) {
 			__rsnd_dai_probe(priv, dai_np, dai_i);
 			if (rsnd_is_gen3(priv)) {
-				struct rsnd_dai *rdai = rsnd_rdai_get(priv, dai_i);
+				struct rsnd_dai *dai = rsnd_rdai_get(priv, dai_i);
 
-				rsnd_parse_connect_graph(priv, &rdai->playback, dai_np);
-				rsnd_parse_connect_graph(priv, &rdai->capture,  dai_np);
+				rsnd_parse_connect_graph(priv, &dai->playback, dai_np);
+				rsnd_parse_connect_graph(priv, &dai->capture,  dai_np);
 			}
 			dai_i++;
 		}
@@ -1377,10 +1377,10 @@ static int rsnd_dai_probe(struct rsnd_priv *priv)
 		for_each_child_of_node(dai_node, dai_np) {
 			__rsnd_dai_probe(priv, dai_np, dai_i);
 			if (rsnd_is_gen3(priv)) {
-				struct rsnd_dai *rdai = rsnd_rdai_get(priv, dai_i);
+				struct rsnd_dai *dai = rsnd_rdai_get(priv, dai_i);
 
-				rsnd_parse_connect_simple(priv, &rdai->playback, dai_np);
-				rsnd_parse_connect_simple(priv, &rdai->capture,  dai_np);
+				rsnd_parse_connect_simple(priv, &dai->playback, dai_np);
+				rsnd_parse_connect_simple(priv, &dai->capture,  dai_np);
 			}
 			dai_i++;
 		}
-- 
2.25.1




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux