[alsa-devel] [PATCH 2/3] ASoC: Intel: Skylake: Fix unused variable warning

Vinod Koul vinod.koul at intel.com
Thu Apr 27 08:51:21 CEST 2017


With compiler option W=1, we have one more warning in the driver for
'set but unused variable', so remove the unused variable to fix it.

sound/soc/intel/skylake/skl-pcm.c: In function ‘skl_platform_open’:
sound/soc/intel/skylake/skl-pcm.c:954:26: warning: variable ‘runtime’ set but not used [-Wunused-but-set-variable]
  struct snd_pcm_runtime *runtime;

Signed-off-by: Vinod Koul <vinod.koul at intel.com>
---
 sound/soc/intel/skylake/skl-pcm.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/sound/soc/intel/skylake/skl-pcm.c b/sound/soc/intel/skylake/skl-pcm.c
index d43d1976dd3b..e91bbcffc856 100644
--- a/sound/soc/intel/skylake/skl-pcm.c
+++ b/sound/soc/intel/skylake/skl-pcm.c
@@ -951,14 +951,12 @@ static int skl_link_hw_free(struct snd_pcm_substream *substream,
 
 static int skl_platform_open(struct snd_pcm_substream *substream)
 {
-	struct snd_pcm_runtime *runtime;
 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
 	struct snd_soc_dai_link *dai_link = rtd->dai_link;
 
 	dev_dbg(rtd->cpu_dai->dev, "In %s:%s\n", __func__,
 					dai_link->cpu_dai_name);
 
-	runtime = substream->runtime;
 	snd_soc_set_runtime_hwparams(substream, &azx_pcm_hw);
 
 	return 0;
-- 
1.9.1



More information about the Alsa-devel mailing list