aboutsummaryrefslogtreecommitdiff
path: root/sound/soc
diff options
context:
space:
mode:
authorPierre-Louis Bossart2021-03-10 18:43:27 -0600
committerMark Brown2021-03-11 13:24:14 +0000
commitd28a9dfeb8071b9ac0e79c8b8b4a0111c3b54c70 (patch)
tree47b035b0aab4bd5f708498cea13172d58a38858a /sound/soc
parent13119a311aeb5a91ea751f10e4158a86361c2f08 (diff)
ASoC: wm8958-dsp2: rename local 'control' arrays
cppcheck complains about shadowed variables: sound/soc/codecs/wm8958-dsp2.c:926:27: style: Local variable 'control' shadows outer variable [shadowVariable] struct snd_kcontrol_new control[] = { ^ sound/soc/codecs/wm8958-dsp2.c:900:17: note: Shadowed declaration struct wm8994 *control = wm8994->wm8994; ^ sound/soc/codecs/wm8958-dsp2.c:926:27: note: Shadow variable struct snd_kcontrol_new control[] = { ^ sound/soc/codecs/wm8958-dsp2.c:952:27: style: Local variable 'control' shadows outer variable [shadowVariable] struct snd_kcontrol_new control[] = { ^ sound/soc/codecs/wm8958-dsp2.c:900:17: note: Shadowed declaration struct wm8994 *control = wm8994->wm8994; ^ sound/soc/codecs/wm8958-dsp2.c:952:27: note: Shadow variable struct snd_kcontrol_new control[] = { ^ sound/soc/codecs/wm8958-dsp2.c:978:27: style: Local variable 'control' shadows outer variable [shadowVariable] struct snd_kcontrol_new control[] = { ^ sound/soc/codecs/wm8958-dsp2.c:900:17: note: Shadowed declaration struct wm8994 *control = wm8994->wm8994; ^ sound/soc/codecs/wm8958-dsp2.c:978:27: note: Shadow variable struct snd_kcontrol_new control[] = { ^ sound/soc/codecs/wm8958-dsp2.c:1006:27: style: Local variable 'control' shadows outer variable [shadowVariable] struct snd_kcontrol_new control[] = { ^ sound/soc/codecs/wm8958-dsp2.c:900:17: note: Shadowed declaration struct wm8994 *control = wm8994->wm8994; ^ sound/soc/codecs/wm8958-dsp2.c:1006:27: note: Shadow variable struct snd_kcontrol_new control[] = { ^ fix by adding a prefix related to each control. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210311004332.120901-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/wm8958-dsp2.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sound/soc/codecs/wm8958-dsp2.c b/sound/soc/codecs/wm8958-dsp2.c
index 3bce9a14f0f3..536339e43dc7 100644
--- a/sound/soc/codecs/wm8958-dsp2.c
+++ b/sound/soc/codecs/wm8958-dsp2.c
@@ -923,7 +923,7 @@ void wm8958_dsp2_init(struct snd_soc_component *component)
component, wm8958_enh_eq_loaded);
if (pdata->num_mbc_cfgs) {
- struct snd_kcontrol_new control[] = {
+ struct snd_kcontrol_new mbc_control[] = {
SOC_ENUM_EXT("MBC Mode", wm8994->mbc_enum,
wm8958_get_mbc_enum, wm8958_put_mbc_enum),
};
@@ -942,14 +942,14 @@ void wm8958_dsp2_init(struct snd_soc_component *component)
wm8994->mbc_enum.texts = wm8994->mbc_texts;
ret = snd_soc_add_component_controls(wm8994->hubs.component,
- control, 1);
+ mbc_control, 1);
if (ret != 0)
dev_err(wm8994->hubs.component->dev,
"Failed to add MBC mode controls: %d\n", ret);
}
if (pdata->num_vss_cfgs) {
- struct snd_kcontrol_new control[] = {
+ struct snd_kcontrol_new vss_control[] = {
SOC_ENUM_EXT("VSS Mode", wm8994->vss_enum,
wm8958_get_vss_enum, wm8958_put_vss_enum),
};
@@ -968,14 +968,14 @@ void wm8958_dsp2_init(struct snd_soc_component *component)
wm8994->vss_enum.texts = wm8994->vss_texts;
ret = snd_soc_add_component_controls(wm8994->hubs.component,
- control, 1);
+ vss_control, 1);
if (ret != 0)
dev_err(wm8994->hubs.component->dev,
"Failed to add VSS mode controls: %d\n", ret);
}
if (pdata->num_vss_hpf_cfgs) {
- struct snd_kcontrol_new control[] = {
+ struct snd_kcontrol_new hpf_control[] = {
SOC_ENUM_EXT("VSS HPF Mode", wm8994->vss_hpf_enum,
wm8958_get_vss_hpf_enum,
wm8958_put_vss_hpf_enum),
@@ -995,7 +995,7 @@ void wm8958_dsp2_init(struct snd_soc_component *component)
wm8994->vss_hpf_enum.texts = wm8994->vss_hpf_texts;
ret = snd_soc_add_component_controls(wm8994->hubs.component,
- control, 1);
+ hpf_control, 1);
if (ret != 0)
dev_err(wm8994->hubs.component->dev,
"Failed to add VSS HPFmode controls: %d\n",
@@ -1003,7 +1003,7 @@ void wm8958_dsp2_init(struct snd_soc_component *component)
}
if (pdata->num_enh_eq_cfgs) {
- struct snd_kcontrol_new control[] = {
+ struct snd_kcontrol_new eq_control[] = {
SOC_ENUM_EXT("Enhanced EQ Mode", wm8994->enh_eq_enum,
wm8958_get_enh_eq_enum,
wm8958_put_enh_eq_enum),
@@ -1023,7 +1023,7 @@ void wm8958_dsp2_init(struct snd_soc_component *component)
wm8994->enh_eq_enum.texts = wm8994->enh_eq_texts;
ret = snd_soc_add_component_controls(wm8994->hubs.component,
- control, 1);
+ eq_control, 1);
if (ret != 0)
dev_err(wm8994->hubs.component->dev,
"Failed to add enhanced EQ controls: %d\n",