[RFC,11/23] ASoC: pci/emu10k1: remove "set but not used' warnings
diff mbox series

Message ID 20200702193604.169059-12-pierre-louis.bossart@linux.intel.com
State New
Headers show
Series
  • ALSA: fix kernel-doc and W=1 warnings
Related show

Commit Message

Pierre-Louis Bossart July 2, 2020, 7:35 p.m. UTC
Fix W=1 warnings. Mark variables used for reads as __always_unused.

sound/pci/emu10k1/emu10k1_main.c: In function
‘snd_emu10k1_cardbus_init’:
sound/pci/emu10k1/emu10k1_main.c:626:15: warning: variable ‘value’ set
but not used [-Wunused-but-set-variable]
  626 |  unsigned int value;
      |               ^~~~~
sound/pci/emu10k1/emu10k1_main.c: In function
‘snd_emu1010_load_firmware_entry’:
sound/pci/emu10k1/emu10k1_main.c:656:15: warning: variable
‘write_post’ set but not used [-Wunused-but-set-variable]
  656 |  unsigned int write_post;
      |               ^~~~~~~~~~

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/pci/emu10k1/emu10k1_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch
diff mbox series

diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c
index 6ff581733a19..bd70e112ffd7 100644
--- a/sound/pci/emu10k1/emu10k1_main.c
+++ b/sound/pci/emu10k1/emu10k1_main.c
@@ -623,7 +623,7 @@  static int snd_emu10k1_ecard_init(struct snd_emu10k1 *emu)
 static int snd_emu10k1_cardbus_init(struct snd_emu10k1 *emu)
 {
 	unsigned long special_port;
-	unsigned int value;
+	__always_unused unsigned int value;
 
 	/* Special initialisation routine
 	 * before the rest of the IO-Ports become active.
@@ -653,7 +653,7 @@  static int snd_emu1010_load_firmware_entry(struct snd_emu10k1 *emu,
 	int n, i;
 	int reg;
 	int value;
-	unsigned int write_post;
+	__always_unused unsigned int write_post;
 	unsigned long flags;
 
 	if (!fw_entry)