[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20200709162328.259586-2-pierre-louis.bossart@linux.intel.com>
Date: Thu, 9 Jul 2020 11:23:18 -0500
From: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
To: alsa-devel@...a-project.org
Cc: tiwai@...e.de, broonie@...nel.org,
Lee Jones <lee.jones@...aro.org>,
Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>,
Arnaud Pouliquen <arnaud.pouliquen@...com>,
Liam Girdwood <lgirdwood@...il.com>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>,
linux-kernel@...r.kernel.org (open list)
Subject: [PATCH v4 01/10] ASoC: sti: uniperif: fix 'defined by not used' warning
Fix W=1 warning. The table uni_tdm_hw is declared in a header included
by multiple C file. This isn't really a good practice but for now
using __maybe_unused makes the following warning go away.
sound/soc/sti/sti_uniperif.c:12:
sound/soc/sti/uniperif.h:1351:38: warning: ‘uni_tdm_hw’ defined but
not used [-Wunused-const-variable=]
1351 | static const struct snd_pcm_hardware uni_tdm_hw = {
| ^~~~~~~~~~
Acked-by: Arnaud Pouliquen <arnaud.pouliquen@...com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
---
sound/soc/sti/uniperif.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/sti/uniperif.h b/sound/soc/sti/uniperif.h
index 2dc2da5d458b..a16adeb7c1e9 100644
--- a/sound/soc/sti/uniperif.h
+++ b/sound/soc/sti/uniperif.h
@@ -1348,7 +1348,7 @@ struct sti_uniperiph_data {
struct sti_uniperiph_dai dai_data;
};
-static const struct snd_pcm_hardware uni_tdm_hw = {
+static __maybe_unused const struct snd_pcm_hardware uni_tdm_hw = {
.info = SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER |
SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_MMAP |
SNDRV_PCM_INFO_MMAP_VALID,
--
2.25.1
Powered by blists - more mailing lists