[RFC PATCH 07/23] ALSA: pci/aw2-saa7146: remove 'set but not used' warning

Pierre-Louis Bossart pierre-louis.bossart at linux.intel.com
Thu Jul 2 21:35:48 CEST 2020


Fix W=1 warning by nothing variable as always unused.

sound/pci/aw2/aw2-saa7146.c: In function ‘snd_aw2_saa7146_interrupt’:
sound/pci/aw2/aw2-saa7146.c:333:15: warning: variable ‘iicsta’ set but
not used [-Wunused-but-set-variable]
  333 |  unsigned int iicsta;
      |               ^~~~~~

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart at linux.intel.com>
---
 sound/pci/aw2/aw2-saa7146.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/pci/aw2/aw2-saa7146.c b/sound/pci/aw2/aw2-saa7146.c
index 4e64eb5d8f64..c84f1a45194f 100644
--- a/sound/pci/aw2/aw2-saa7146.c
+++ b/sound/pci/aw2/aw2-saa7146.c
@@ -330,7 +330,7 @@ void snd_aw2_saa7146_pcm_trigger_stop_capture(struct snd_aw2_saa7146 *chip,
 irqreturn_t snd_aw2_saa7146_interrupt(int irq, void *dev_id)
 {
 	unsigned int isr;
-	unsigned int iicsta;
+	__always_unused unsigned int iicsta;
 	struct snd_aw2_saa7146 *chip = dev_id;
 
 	isr = READREG(ISR);
-- 
2.25.1



More information about the Alsa-devel mailing list