ASoC: wm8958-dsp2: rename local 'control' arrays
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Thu, 11 Mar 2021 00:43:27 +0000 (18:43 -0600)
committerMark Brown <broonie@kernel.org>
Thu, 11 Mar 2021 13:24:14 +0000 (13:24 +0000)
commitd28a9dfeb8071b9ac0e79c8b8b4a0111c3b54c70
tree47b035b0aab4bd5f708498cea13172d58a38858a
parent13119a311aeb5a91ea751f10e4158a86361c2f08
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>
sound/soc/codecs/wm8958-dsp2.c