Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: pci/korg1212: remove 'set but not used' warnings

Fix W=1 warnings. Two variables are only used for debug logs, mark
with __maybe_unused:

sound/pci/korg1212/korg1212.c: In function ‘snd_korg1212_create’:
sound/pci/korg1212/korg1212.c:2152:36: warning: variable ‘iomem2_size’
set but not used [-Wunused-but-set-variable]
2152 | unsigned ioport_size, iomem_size, iomem2_size;
| ^~~~~~~~~~~
sound/pci/korg1212/korg1212.c:2152:11: warning: variable ‘ioport_size’
set but not used [-Wunused-but-set-variable]
2152 | unsigned ioport_size, iomem_size, iomem2_size;
| ^~~~~~~~~~~

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200702193604.169059-15-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Pierre-Louis Bossart and committed by
Takashi Iwai
6cdc01eb 518fe506

+3 -1
+3 -1
sound/pci/korg1212/korg1212.c
··· 2149 2149 { 2150 2150 int err, rc; 2151 2151 unsigned int i; 2152 - unsigned ioport_size, iomem_size, iomem2_size; 2152 + unsigned iomem_size; 2153 + __maybe_unused unsigned ioport_size; 2154 + __maybe_unused unsigned iomem2_size; 2153 2155 struct snd_korg1212 * korg1212; 2154 2156 const struct firmware *dsp_code; 2155 2157