summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2018-08-01 06:47:42 -0400
committerTakashi Iwai <tiwai@suse.de>2018-08-06 15:36:14 -0400
commitd2f884612c42850db0b3521b74a05636a5fc035f (patch)
tree4ea0f1bd0815149852cf08285cbb4ebb7b66a382
parentef0075280cfe09ef076ce1b85f0a2294c5ed86f3 (diff)
ALSA: intel_hdmi: remove redundant variable cfg_val
Variable cfg_val is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: warning: variable 'cfg_val' set but not used [-Wunused-but-set-variable] [ Background info about val_bit field from alsa-devel ML thread: tiwai: Actually this made me wonder what is the definition of val_bit. It seems always 1 in the current code after the commit 964ca8083c02. Pierre? pbossart: This val_bit is only there for debug/test, it should be set to one by default and has nothing to do with the lpcm_id. This variable was set even in patches before upstream submission and was never needed, I guess it must be a 9-yr old issue. Good catch! ] Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/x86/intel_hdmi_audio.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/sound/x86/intel_hdmi_audio.c b/sound/x86/intel_hdmi_audio.c
index edc9f5a34eff..fa7dca5a68c8 100644
--- a/sound/x86/intel_hdmi_audio.c
+++ b/sound/x86/intel_hdmi_audio.c
@@ -290,7 +290,6 @@ static void had_reset_audio(struct snd_intelhad *intelhaddata)
290static int had_prog_status_reg(struct snd_pcm_substream *substream, 290static int had_prog_status_reg(struct snd_pcm_substream *substream,
291 struct snd_intelhad *intelhaddata) 291 struct snd_intelhad *intelhaddata)
292{ 292{
293 union aud_cfg cfg_val = {.regval = 0};
294 union aud_ch_status_0 ch_stat0 = {.regval = 0}; 293 union aud_ch_status_0 ch_stat0 = {.regval = 0};
295 union aud_ch_status_1 ch_stat1 = {.regval = 0}; 294 union aud_ch_status_1 ch_stat1 = {.regval = 0};
296 295
@@ -298,7 +297,6 @@ static int had_prog_status_reg(struct snd_pcm_substream *substream,
298 IEC958_AES0_NONAUDIO) >> 1; 297 IEC958_AES0_NONAUDIO) >> 1;
299 ch_stat0.regx.clk_acc = (intelhaddata->aes_bits & 298 ch_stat0.regx.clk_acc = (intelhaddata->aes_bits &
300 IEC958_AES3_CON_CLOCK) >> 4; 299 IEC958_AES3_CON_CLOCK) >> 4;
301 cfg_val.regx.val_bit = ch_stat0.regx.lpcm_id;
302 300
303 switch (substream->runtime->rate) { 301 switch (substream->runtime->rate) {
304 case AUD_SAMPLE_RATE_32: 302 case AUD_SAMPLE_RATE_32: