From b7ef111479da414fe81c6fc28a539d1dc20da1b4 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Wed, 29 May 2019 08:49:40 -0500 Subject: [PATCH] ASoC: SOF: Intel: hda-dsp: fix compilation warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sound/soc/sof/intel/hda-dsp.c: In function ‘hda_dsp_set_hw_params_upon_resume’: sound/soc/sof/intel/hda-dsp.c:469:6: error: variable ‘stream_tag’ set but not used [-Werror=unused-but-set-variable] int stream_tag; Signed-off-by: Pierre-Louis Bossart --- sound/soc/sof/intel/hda-dsp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/sof/intel/hda-dsp.c b/sound/soc/sof/intel/hda-dsp.c index 17f6054d3d68bd..c6eea3079ab747 100644 --- a/sound/soc/sof/intel/hda-dsp.c +++ b/sound/soc/sof/intel/hda-dsp.c @@ -465,8 +465,8 @@ int hda_dsp_set_hw_params_upon_resume(struct snd_sof_dev *sdev) struct snd_soc_pcm_runtime *rtd; struct hdac_ext_link *link; const char *name; -#endif int stream_tag; +#endif /* set internal flag for BE */ list_for_each_entry(s, &bus->stream_list, list) { @@ -474,7 +474,6 @@ int hda_dsp_set_hw_params_upon_resume(struct snd_sof_dev *sdev) hda_stream = container_of(stream, struct sof_intel_hda_stream, hda_stream); hda_stream->hw_params_upon_resume = 1; - stream_tag = hdac_stream(stream)->stream_tag; #if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA) /* * clear and release stream. This should already be taken care @@ -488,6 +487,7 @@ int hda_dsp_set_hw_params_upon_resume(struct snd_sof_dev *sdev) link = snd_hdac_ext_bus_get_link(bus, name); if (!link) return -EINVAL; + stream_tag = hdac_stream(stream)->stream_tag; snd_hdac_ext_link_clear_stream_id(link, stream_tag); snd_hdac_ext_stream_release(stream, HDAC_EXT_STREAM_TYPE_LINK);