Blob Blame History Raw
From 6cdc01ebdfb0fef163d48d265b12325eaf06103f Mon Sep 17 00:00:00 2001
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Date: Thu, 2 Jul 2020 14:35:55 -0500
Subject: [PATCH] ALSA: pci/korg1212: remove 'set but not used' warnings
Mime-version: 1.0
Content-type: text/plain; charset=UTF-8
Content-transfer-encoding: 8bit
Git-commit: 6cdc01ebdfb0fef163d48d265b12325eaf06103f
Patch-mainline: v5.9-rc1
References: jsc#SLE-16518

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>

---
 sound/pci/korg1212/korg1212.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sound/pci/korg1212/korg1212.c b/sound/pci/korg1212/korg1212.c
index 65a887b217ee..2eddd9de9e6d 100644
--- a/sound/pci/korg1212/korg1212.c
+++ b/sound/pci/korg1212/korg1212.c
@@ -2149,7 +2149,9 @@ static int snd_korg1212_create(struct snd_card *card, struct pci_dev *pci,
 {
         int err, rc;
         unsigned int i;
-	unsigned ioport_size, iomem_size, iomem2_size;
+	unsigned iomem_size;
+	__maybe_unused unsigned ioport_size;
+	__maybe_unused unsigned iomem2_size;
         struct snd_korg1212 * korg1212;
 	const struct firmware *dsp_code;
 
-- 
2.16.4