diff mbox series

[7/7] ASoC: codecs: wm8400: add _maybe_unused as needed

Message ID 20200701181320.80848-8-pierre-louis.bossart@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series ASoC: codecs: wm/cs: fix kernel-doc and W=1 warnings | expand

Commit Message

Pierre-Louis Bossart July 1, 2020, 6:13 p.m. UTC
Fix W=1 warning by adding __maybe_unused. Maintainers for this file
may want to double-check if those definitions are necessary.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/codecs/wm8400.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Charles Keepax July 2, 2020, 9:23 a.m. UTC | #1
On Wed, Jul 01, 2020 at 01:13:20PM -0500, Pierre-Louis Bossart wrote:
> Fix W=1 warning by adding __maybe_unused. Maintainers for this file
> may want to double-check if those definitions are necessary.
> 
> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> ---

Yeah I think in this case better to remove them, they arn't used
in the driver, the driver is pretty old and no one really works
on it so little chance the features are ever getting added.

Thanks,
Charles
Pierre-Louis Bossart July 2, 2020, 3:07 p.m. UTC | #2
On 7/2/20 4:23 AM, Charles Keepax wrote:
> On Wed, Jul 01, 2020 at 01:13:20PM -0500, Pierre-Louis Bossart wrote:
>> Fix W=1 warning by adding __maybe_unused. Maintainers for this file
>> may want to double-check if those definitions are necessary.
>>
>> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
>> ---
> 
> Yeah I think in this case better to remove them, they arn't used
> in the driver, the driver is pretty old and no one really works
> on it so little chance the features are ever getting added.

Thanks Charles, I can resend a v2 series with your Acked-by and remove 
these definitions.

Out of curiosity, who can check the patch 1 and 2 (cs4270 / cs42l42)?
diff mbox series

Patch

diff --git a/sound/soc/codecs/wm8400.c b/sound/soc/codecs/wm8400.c
index 2551eb0f1868..1e5671d345da 100644
--- a/sound/soc/codecs/wm8400.c
+++ b/sound/soc/codecs/wm8400.c
@@ -67,7 +67,7 @@  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 __maybe_unused const DECLARE_TLV_DB_SCALE(rec_mix_tlv, -1500, 600, 0);
 
 static const DECLARE_TLV_DB_SCALE(in_pga_tlv, -1650, 3000, 0);
 
@@ -75,7 +75,7 @@  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 __maybe_unused const DECLARE_TLV_DB_SCALE(out_omix_tlv, -600, 0, 0);
 
 static const DECLARE_TLV_DB_SCALE(out_dac_tlv, -7163, 0, 0);
 
@@ -440,7 +440,7 @@  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[] = {
+static __maybe_unused 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,