[PATCH 28/28] ASoC: codecs: wm8400: Remove a bunch of unused variables

From: Lee Jones
Date: Tue Jul 07 2020 - 06:17:38 EST


Fixes the following W=1 kernel build warning(s):

sound/soc/codecs/wm8400.c:443:38: warning: âwm8400_dapm_rxvoice_controlsâ defined but not used [-Wunused-const-variable=]
443 | static const struct snd_kcontrol_new wm8400_dapm_rxvoice_controls[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/sound/tlv.h:10,
from sound/soc/codecs/wm8400.c:26:
sound/soc/codecs/wm8400.c:78:35: warning: âout_omix_tlvâ defined but not used [-Wunused-const-variable=]
78 | static const DECLARE_TLV_DB_SCALE(out_omix_tlv, -600, 0, 0);
| ^~~~~~~~~~~~
include/uapi/sound/tlv.h:64:15: note: in definition of macro âSNDRV_CTL_TLVD_DECLARE_DB_SCALEâ
64 | unsigned int name[] = { | ^~~~
sound/soc/codecs/wm8400.c:78:14: note: in expansion of macro âDECLARE_TLV_DB_SCALEâ
78 | static const DECLARE_TLV_DB_SCALE(out_omix_tlv, -600, 0, 0);
| ^~~~~~~~~~~~~~~~~~~~
sound/soc/codecs/wm8400.c:70:35: warning: ârec_mix_tlvâ defined but not used [-Wunused-const-variable=]
70 | static const DECLARE_TLV_DB_SCALE(rec_mix_tlv, -1500, 600, 0);
| ^~~~~~~~~~~
include/uapi/sound/tlv.h:64:15: note: in definition of macro âSNDRV_CTL_TLVD_DECLARE_DB_SCALEâ
64 | unsigned int name[] = { | ^~~~
sound/soc/codecs/wm8400.c:70:14: note: in expansion of macro âDECLARE_TLV_DB_SCALEâ
70 | static const DECLARE_TLV_DB_SCALE(rec_mix_tlv, -1500, 600, 0);
| ^~~~~~~~~~~~~~~~~~~~

Cc: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
Cc: patches@xxxxxxxxxxxxxxxxxxxxx
Signed-off-by: Lee Jones <lee.jones@xxxxxxxxxx>
---
sound/soc/codecs/wm8400.c | 12 ------------
1 file changed, 12 deletions(-)

diff --git a/sound/soc/codecs/wm8400.c b/sound/soc/codecs/wm8400.c
index 2551eb0f1868c..35ffa7765c85c 100644
--- a/sound/soc/codecs/wm8400.c
+++ b/sound/soc/codecs/wm8400.c
@@ -67,16 +67,12 @@ static void wm8400_component_reset(struct snd_soc_component *component)
wm8400_reset_codec_reg_cache(wm8400->wm8400);
}

-static const DECLARE_TLV_DB_SCALE(rec_mix_tlv, -1500, 600, 0);
-
static const DECLARE_TLV_DB_SCALE(in_pga_tlv, -1650, 3000, 0);

static const DECLARE_TLV_DB_SCALE(out_mix_tlv, -2100, 0, 0);

static const DECLARE_TLV_DB_SCALE(out_pga_tlv, -7300, 600, 0);

-static const DECLARE_TLV_DB_SCALE(out_omix_tlv, -600, 0, 0);
-
static const DECLARE_TLV_DB_SCALE(out_dac_tlv, -7163, 0, 0);

static const DECLARE_TLV_DB_SCALE(in_adc_tlv, -7163, 1763, 0);
@@ -439,14 +435,6 @@ static SOC_ENUM_SINGLE_DECL(wm8400_ainrmux_enum,
static const struct snd_kcontrol_new wm8400_dapm_ainrmux_controls =
SOC_DAPM_ENUM("Route", wm8400_ainrmux_enum);

-/* RXVOICE */
-static const struct snd_kcontrol_new wm8400_dapm_rxvoice_controls[] = {
-SOC_DAPM_SINGLE_TLV("LIN4/RXN", WM8400_INPUT_MIXER5, WM8400_LR4BVOL_SHIFT,
- WM8400_LR4BVOL_MASK, 0, in_mix_tlv),
-SOC_DAPM_SINGLE_TLV("RIN4/RXP", WM8400_INPUT_MIXER6, WM8400_RL4BVOL_SHIFT,
- WM8400_RL4BVOL_MASK, 0, in_mix_tlv),
-};
-
/* LOMIX */
static const struct snd_kcontrol_new wm8400_dapm_lomix_controls[] = {
SOC_DAPM_SINGLE("LOMIX Right ADC Bypass Switch", WM8400_OUTPUT_MIXER1,
--
2.25.1