Commit d2f88461 authored by Colin Ian King's avatar Colin Ian King Committed by Takashi Iwai

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
	964ca808. 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: default avatarColin Ian King <colin.king@canonical.com>
Acked-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent ef007528
......@@ -290,7 +290,6 @@ static void had_reset_audio(struct snd_intelhad *intelhaddata)
static int had_prog_status_reg(struct snd_pcm_substream *substream,
struct snd_intelhad *intelhaddata)
{
union aud_cfg cfg_val = {.regval = 0};
union aud_ch_status_0 ch_stat0 = {.regval = 0};
union aud_ch_status_1 ch_stat1 = {.regval = 0};
......@@ -298,7 +297,6 @@ static int had_prog_status_reg(struct snd_pcm_substream *substream,
IEC958_AES0_NONAUDIO) >> 1;
ch_stat0.regx.clk_acc = (intelhaddata->aes_bits &
IEC958_AES3_CON_CLOCK) >> 4;
cfg_val.regx.val_bit = ch_stat0.regx.lpcm_id;
switch (substream->runtime->rate) {
case AUD_SAMPLE_RATE_32:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment