ASoC: codecs: wm/cs: fix kernel-doc and W=1 warnings
Subsystems (4)
cover ASoC: codecs: wm/cs: fix kernel-doc and W=1 warnings
I've been doing a lot of cleanups to get to zero warnings with W=1, here's the first batch for Cirrus/Wolfson codecs.
Pierre-Louis Bossart (7):
ASoC: codecs: cs4270: fix kernel-doc
ASoC: codecs: cs42l42: remove always-true comparisons
ASoC: codecs: wm8986: fix missing kernel-doc arguments
ASoC: codecs: wm8960: fix kernel-doc
ASoC: codecs: wm9713: remove spurious kernel-doc comment start
ASoC: codecs: wm8994: fix kernel-doc
ASoC: codecs: wm8400: add _maybe_unused as needed
sound/soc/codecs/cs4270.c | 4 ++-- sound/soc/codecs/cs42l42.c | 9 +++------ sound/soc/codecs/wm8400.c | 6 +++--- sound/soc/codecs/wm8960.c | 2 +- sound/soc/codecs/wm8994.c | 4 ++++ sound/soc/codecs/wm8996.c | 3 +++ sound/soc/codecs/wm9713.c | 2 +- 7 files changed, 17 insertions(+), 13 deletions(-)
base-commit: a2b782d59c57cb6f673dbb4804ffc500336d7a54
Signature · 1 line
2.25.1
PATCH 1/7 ASoC: codecs: cs4270: fix kernel-doc
Fix W=1 warnings
cs4270.c:508: warning: Function parameter or member 'component' not described in 'cs4270_probe'
cs4270.c:508: warning: Excess function parameter 'pdev' description in 'cs4270_probe'
cs4270.c:548: warning: Function parameter or member 'component' not described in 'cs4270_remove'
cs4270.c:548: warning: Excess function parameter 'pdev' description in 'cs4270_remove'
--- sound/soc/codecs/cs4270.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/cs4270.c +2 -2
@@ -499,7 +499,7 @@ static struct snd_soc_dai_driver cs4270_dai = {/** * cs4270_probe - ASoC probe function -* @pdev: platform device +* @component: ASoC component * * This function is called when ASoC has all the pieces it needs to * instantiate a sound driver.
@@ -540,7 +540,7 @@ static int cs4270_probe(struct snd_soc_component *component)/** * cs4270_remove - ASoC remove function -* @pdev: platform device +* @component: ASoC component * * This function is the counterpart to cs4270_probe(). */
Signature · 1 line
2.25.1
PATCH 2/7 ASoC: codecs: cs42l42: remove always-true comparisons
In reply to Pierre-Louis BossartFix W=1 warnings:
cs42l42.c: In function 'cs42l42_handle_device_data':
cs42l42.c:1661:12: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
1661 | if ((val >= CS42L42_BTN_DET_INIT_DBNCE_MIN) &&
| ^~
cs42l42.c:1679:12: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
1679 | if ((val >= CS42L42_BTN_DET_EVENT_DBNCE_MIN) &&
| ^~
cs42l42.c:1698:23: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
1698 | if ((thresholds[i] >= CS42L42_HS_DET_LEVEL_MIN) &&
| ^~
--- sound/soc/codecs/cs42l42.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
sound/soc/codecs/cs42l42.c +3 -6
@@ -1658,8 +1658,7 @@ static int cs42l42_handle_device_data(struct i2c_client *i2c_client, ret =of_property_read_u32 (np,"cirrus,btn-det-init-dbnce" , &val);if (!ret) { -if ((val >=CS42L42_BTN_DET_INIT_DBNCE_MIN ) && - (val <=CS42L42_BTN_DET_INIT_DBNCE_MAX )) +if (val <=CS42L42_BTN_DET_INIT_DBNCE_MAX ) cs42l42->btn_det_init_dbnce = val;else { dev_err(&i2c_client->dev,
@@ -1676,8 +1675,7 @@ static int cs42l42_handle_device_data(struct i2c_client *i2c_client, ret =of_property_read_u32 (np,"cirrus,btn-det-event-dbnce" , &val);if (!ret) { -if ((val >=CS42L42_BTN_DET_EVENT_DBNCE_MIN ) && - (val <=CS42L42_BTN_DET_EVENT_DBNCE_MAX )) +if (val <=CS42L42_BTN_DET_EVENT_DBNCE_MAX ) cs42l42->btn_det_event_dbnce = val;else { dev_err(&i2c_client->dev,
@@ -1695,8 +1693,7 @@ static int cs42l42_handle_device_data(struct i2c_client *i2c_client,if (!ret) {for (i =0 ; i <CS42L42_NUM_BIASES ; i++) { -if ((thresholds[i] >=CS42L42_HS_DET_LEVEL_MIN ) && - (thresholds[i] <=CS42L42_HS_DET_LEVEL_MAX )) +if (thresholds[i] <=CS42L42_HS_DET_LEVEL_MAX ) cs42l42->bias_thresholds[i] = thresholds[i];else { dev_err(&i2c_client->dev,
Signature · 1 line
2.25.1
PATCH 3/7 ASoC: codecs: wm8986: fix missing kernel-doc arguments
In reply to Pierre-Louis BossartFix W=1 warning
--- sound/soc/codecs/wm8996.c | 3 +++ 1 file changed, 3 insertions(+)
sound/soc/codecs/wm8996.c +3 -0
@@ -2224,6 +2224,9 @@ static void wm8996_free_gpio(struct wm8996_priv *wm8996)/** * wm8996_detect - Enable default WM8996 jack detection +* @component: ASoC component +* @jack: jack pointer +* @polarity_cb: polarity callback * * The WM8996 has advanced accessory detection support for headsets. * This function provides a default implementation which integrates
Signature · 1 line
2.25.1
Re: [PATCH 3/7] ASoC: codecs: wm8986: fix missing kernel-doc arguments
Quoted 4 lines · Pierre-Louis Bossart
Fix W=1 warning
Signed-off-by Pierre-Louis Bossart <[email protected]>---
Thanks,
Charles
PATCH 4/7 ASoC: codecs: wm8960: fix kernel-doc
In reply to Pierre-Louis BossartFix W=1 warning
--- sound/soc/codecs/wm8960.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/wm8960.c +1 -1
@@ -612,7 +612,7 @@ static const int bclk_divs[] = {* triplet, we relax the bclk such that bclk is chosen as the * closest available frequency greater than expected bclk. * -* @wm8960_priv: wm8960 codec private data +* @wm8960: codec private data * @mclk: MCLK used to derive sysclk * @sysclk_idx: sysclk_divs index for found sysclk * @dac_idx: dac_divs index for found lrclk
Signature · 1 line
2.25.1
Re: [PATCH 4/7] ASoC: codecs: wm8960: fix kernel-doc
Quoted 4 lines · Pierre-Louis Bossart
Fix W=1 warning
Signed-off-by Pierre-Louis Bossart <[email protected]>---
Thanks,
Charles
PATCH 5/7 ASoC: codecs: wm9713: remove spurious kernel-doc comment start
In reply to Pierre-Louis BossartFix W=1 warning
--- sound/soc/codecs/wm9713.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/wm9713.c +1 -1
@@ -807,7 +807,7 @@ static void pll_factors(struct snd_soc_component *component, pll_div->k =K ; } -/** +/* * Please note that changing the PLL input frequency may require * resynchronisation with the AC97 controller. */
Signature · 1 line
2.25.1
Re: [PATCH 5/7] ASoC: codecs: wm9713: remove spurious kernel-doc comment start
Quoted 4 lines · Pierre-Louis Bossart
Fix W=1 warning
Signed-off-by Pierre-Louis Bossart <[email protected]>---
Thanks,
Charles
PATCH 6/7 ASoC: codecs: wm8994: fix kernel-doc
In reply to Pierre-Louis BossartFix W=1 warning
--- sound/soc/codecs/wm8994.c | 4 ++++ 1 file changed, 4 insertions(+)
sound/soc/codecs/wm8994.c +4 -0
@@ -3877,6 +3877,10 @@ static void wm1811_jackdet_bootstrap(struct work_struct *work)* * @component: WM8958 component * @jack: jack to report detection events on +* @det_cb: detection callback +* @det_cb_data: data for detection callback +* @id_cb: mic id callback +* @id_cb_data: data for mic id callback * * Enable microphone detection functionality for the WM8958. By * default simple detection which supports the detection of up to 6
Signature · 1 line
2.25.1
Re: [PATCH 6/7] ASoC: codecs: wm8994: fix kernel-doc
Quoted 4 lines · Pierre-Louis Bossart
Fix W=1 warning
Signed-off-by Pierre-Louis Bossart <[email protected]>---
Thanks,
Charles
PATCH 7/7 ASoC: codecs: wm8400: add _maybe_unused as needed
In reply to Pierre-Louis BossartFix W=1 warning by adding __maybe_unused. Maintainers for this file may want to double-check if those definitions are necessary.
--- sound/soc/codecs/wm8400.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
sound/soc/codecs/wm8400.c +3 -3
@@ -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,
Signature · 1 line
2.25.1
Re: [PATCH 7/7] ASoC: codecs: wm8400: add _maybe_unused as needed
Quoted 5 lines · Pierre-Louis Bossart
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 <[email protected]>---
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
Re: [PATCH 7/7] ASoC: codecs: wm8400: add _maybe_unused as needed
Quoted 10 lines · Charles Keepax
Quoted 5 lines · Pierre-Louis Bossart
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 <[email protected]>---
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)?
Mark Brown
maintainerQuoted 12 lines · Pierre-Louis Bossart
I've been doing a lot of cleanups to get to zero warnings with W=1, here's the first batch for Cirrus/Wolfson codecs.
Pierre-Louis Bossart (7):
ASoC: codecs: cs4270: fix kernel-doc
ASoC: codecs: cs42l42: remove always-true comparisons
ASoC: codecs: wm8986: fix missing kernel-doc arguments
ASoC: codecs: wm8960: fix kernel-doc
ASoC: codecs: wm9713: remove spurious kernel-doc comment start
ASoC: codecs: wm8994: fix kernel-doc
ASoC: codecs: wm8400: add_maybe_unusedas needed
Quoted 1 line
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/6] ASoC: codecs: cs4270: fix kernel-doc
commit: 7fdc1512096217c2888959bf662ebff9f37021aa
[2/6] ASoC: codecs: cs42l42: remove always-true comparisons
commit: 5502ce4ea214658c4ed80afc024a6fa6a6837023
[3/6] ASoC: codecs: wm8986: fix missing kernel-doc arguments
commit: 824186fbf73499adad545a3ae30b0a3feef4f05a
[4/6] ASoC: codecs: wm8960: fix kernel-doc
commit: 419eac3cff69c07bf38902be1b245dee3b309342
[5/6] ASoC: codecs: wm9713: remove spurious kernel-doc comment start
commit: 442950a3dc9ced1e3416e497f97636cc4c955ccf
[6/6] ASoC: codecs: wm8994: fix kernel-doc
commit: 7c4084e1127026546b102152cebda297b8237870All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark