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.comSigned-off-by: Mark Brown <broonie@kernel.org>
Showing
Please register or sign in to comment