]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hda: auto_parser: remove shadowed variable declaration
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Wed, 2 Sep 2020 21:21:25 +0000 (16:21 -0500)
committerTakashi Iwai <tiwai@suse.de>
Thu, 3 Sep 2020 07:27:00 +0000 (09:27 +0200)
commit9ad7d2a0691d0b2fe2e3f874df2fef01df4ff269
tree074ccf47ef1a9cefe6839b99f351fdf645eac7e6
parent258a9a1426c29e96568b4d61759da918ae45a254
ALSA: hda: auto_parser: remove shadowed variable declaration

Fix cppcheck warning:

sound/pci/hda/hda_auto_parser.c:353:7: style: Local variable 'i'
shadows outer variable [shadowVariable]
  int i = 0;
      ^
sound/pci/hda/hda_auto_parser.c:182:6: note: Shadowed declaration
 int i;
     ^
sound/pci/hda/hda_auto_parser.c:353:7: note: Shadow variable
  int i = 0;
      ^

It's not clear why a new declaration was added, remove and reuse
variable declared with larger scope.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200902212133.30964-11-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_auto_parser.c