• Pierre-Louis Bossart's avatar
    ASoC: wm8958-dsp2: rename local 'control' arrays · d28a9dfe
    Pierre-Louis Bossart authored
    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: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    Acked-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
    Link: https://lore.kernel.org/r/20210311004332.120901-6-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
    d28a9dfe
wm8958-dsp2.c 28.3 KB