diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2020-07-02 14:35:44 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2020-07-07 12:02:54 +0200 |
commit | 232af6a9057de84a17b59626d73278d2dde34c75 (patch) | |
tree | 8b9d366f6d7569a9d9335047fdf781cd29f2d3c6 | |
parent | 6a4f2b6947d0f340a40359a906d07642825ac14e (diff) | |
download | linux-stable-232af6a9057de84a17b59626d73278d2dde34c75.tar.gz linux-stable-232af6a9057de84a17b59626d73278d2dde34c75.tar.bz2 linux-stable-232af6a9057de84a17b59626d73278d2dde34c75.zip |
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: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200702193604.169059-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/pci/asihpi/asihpi.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sound/pci/asihpi/asihpi.c b/sound/pci/asihpi/asihpi.c index a9540c2c4a1a..faa879f175a9 100644 --- a/sound/pci/asihpi/asihpi.c +++ b/sound/pci/asihpi/asihpi.c @@ -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], |