Commit 232af6a9 authored by Pierre-Louis Bossart's avatar Pierre-Louis Bossart Committed by Takashi Iwai

ALSA: pci/asihpi: remove 'set but not used' warnings

Fix W=1 warnings by removing 2 unnecessary initializations and
removing a variable that's not used.

sound/pci/asihpi/asihpi.c: In function ‘snd_asihpi_tuner_band_get’:
sound/pci/asihpi/asihpi.c:1907:6: warning: variable ‘num_bands’ set
but not used [-Wunused-but-set-variable]
 1907 |  u32 num_bands = 0;
      |      ^~~~~~~~~
sound/pci/asihpi/asihpi.c: In function ‘snd_asihpi_tuner_band_put’:
sound/pci/asihpi/asihpi.c:1934:6: warning: variable ‘num_bands’ set
 but not used [-Wunused-but-set-variable]
 1934 |  u32 num_bands = 0;
      |      ^~~~~~~~~
sound/pci/asihpi/asihpi.c: In function ‘snd_asihpi_mux_info’:
sound/pci/asihpi/asihpi.c:2164:6: warning: variable ‘err’ set but not
 used [-Wunused-but-set-variable]
 2164 |  int err;
      |      ^~~
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200702193604.169059-4-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 6a4f2b69
......@@ -1904,7 +1904,7 @@ static int snd_asihpi_tuner_band_get(struct snd_kcontrol *kcontrol,
*/
u16 band, idx;
u16 tuner_bands[HPI_TUNER_BAND_LAST];
u32 num_bands = 0;
u32 num_bands;
num_bands = asihpi_tuner_band_query(kcontrol, tuner_bands,
HPI_TUNER_BAND_LAST);
......@@ -1931,7 +1931,7 @@ static int snd_asihpi_tuner_band_put(struct snd_kcontrol *kcontrol,
unsigned int idx;
u16 band;
u16 tuner_bands[HPI_TUNER_BAND_LAST];
u32 num_bands = 0;
u32 num_bands;
num_bands = asihpi_tuner_band_query(kcontrol, tuner_bands,
HPI_TUNER_BAND_LAST);
......@@ -2161,7 +2161,6 @@ static int snd_card_asihpi_mux_count_sources(struct snd_kcontrol *snd_control)
static int snd_asihpi_mux_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{
int err;
u16 src_node_type, src_node_index;
u32 h_control = kcontrol->private_value;
......@@ -2174,10 +2173,9 @@ static int snd_asihpi_mux_info(struct snd_kcontrol *kcontrol,
uinfo->value.enumerated.item =
uinfo->value.enumerated.items - 1;
err =
hpi_multiplexer_query_source(h_control,
uinfo->value.enumerated.item,
&src_node_type, &src_node_index);
hpi_multiplexer_query_source(h_control,
uinfo->value.enumerated.item,
&src_node_type, &src_node_index);
sprintf(uinfo->value.enumerated.name, "%s %d",
asihpi_src_names[src_node_type - HPI_SOURCENODE_NONE],
......
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