[PATCH 00/10] ASoC: codecs: wolfson: remove cppcheck warnings
There should be no functionality change, just minor fixes to make warnings go away.
Pierre-Louis Bossart (10): ASoC: arizona: fix function argument ASoC: madera: align function prototype ASoC: wm2200: remove unused structure ASoC: wm8903: remove useless assignments ASoC: wm8958-dsp2: rename local 'control' arrays ASoC: wm8978: clarify expression ASoC: wm8994: align function prototype ASoC: wm8996: clarify expression ASoC: wm_adsp: simplify return value ASoC: wm_hubs: align function prototype
sound/soc/codecs/arizona.h | 2 +- sound/soc/codecs/madera.h | 2 +- sound/soc/codecs/wm2200.c | 7 ------- sound/soc/codecs/wm8903.c | 2 -- sound/soc/codecs/wm8958-dsp2.c | 16 ++++++++-------- sound/soc/codecs/wm8978.c | 2 +- sound/soc/codecs/wm8994.h | 2 +- sound/soc/codecs/wm8996.c | 2 +- sound/soc/codecs/wm_adsp.c | 2 +- sound/soc/codecs/wm_hubs.h | 2 +- 10 files changed, 15 insertions(+), 24 deletions(-)
Cppcheck warning:
sound/soc/codecs/arizona.c:2042:53: style:inconclusive: Function 'arizona_init_dai' argument 2 names different: declaration 'dai' definition 'id'. [funcArgNamesDifferent] int arizona_init_dai(struct arizona_priv *priv, int id) ^ sound/soc/codecs/arizona.h:320:53: note: Function 'arizona_init_dai' argument 2 names different: declaration 'dai' definition 'id'. int arizona_init_dai(struct arizona_priv *priv, int dai); ^ sound/soc/codecs/arizona.c:2042:53: note: Function 'arizona_init_dai' argument 2 names different: declaration 'dai' definition 'id'. int arizona_init_dai(struct arizona_priv *priv, int id) ^
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com --- sound/soc/codecs/arizona.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/arizona.h b/sound/soc/codecs/arizona.h index b893d3e4c97c..b3abbe80f11d 100644 --- a/sound/soc/codecs/arizona.h +++ b/sound/soc/codecs/arizona.h @@ -317,7 +317,7 @@ int arizona_init_vol_limit(struct arizona *arizona); int arizona_init_spk_irqs(struct arizona *arizona); int arizona_free_spk_irqs(struct arizona *arizona);
-int arizona_init_dai(struct arizona_priv *priv, int dai); +int arizona_init_dai(struct arizona_priv *priv, int id);
int arizona_set_output_mode(struct snd_soc_component *component, int output, bool diff);
On Wed, Mar 10, 2021 at 06:43:23PM -0600, Pierre-Louis Bossart wrote:
Cppcheck warning:
sound/soc/codecs/arizona.c:2042:53: style:inconclusive: Function 'arizona_init_dai' argument 2 names different: declaration 'dai' definition 'id'. [funcArgNamesDifferent] int arizona_init_dai(struct arizona_priv *priv, int id) ^ sound/soc/codecs/arizona.h:320:53: note: Function 'arizona_init_dai' argument 2 names different: declaration 'dai' definition 'id'. int arizona_init_dai(struct arizona_priv *priv, int dai); ^ sound/soc/codecs/arizona.c:2042:53: note: Function 'arizona_init_dai' argument 2 names different: declaration 'dai' definition 'id'. int arizona_init_dai(struct arizona_priv *priv, int id) ^
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com
Acked-by: Charles Keepax ckeepax@opensource.cirrus.com
Thanks, Charles
cppcheck warning:
sound/soc/codecs/madera.c:3372:51: style:inconclusive: Function 'madera_init_dai' argument 2 names different: declaration 'dai' definition 'id'. [funcArgNamesDifferent] int madera_init_dai(struct madera_priv *priv, int id) ^ sound/soc/codecs/madera.h:433:51: note: Function 'madera_init_dai' argument 2 names different: declaration 'dai' definition 'id'. int madera_init_dai(struct madera_priv *priv, int dai); ^ sound/soc/codecs/madera.c:3372:51: note: Function 'madera_init_dai' argument 2 names different: declaration 'dai' definition 'id'. int madera_init_dai(struct madera_priv *priv, int id) ^
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com --- sound/soc/codecs/madera.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/madera.h b/sound/soc/codecs/madera.h index e0c0be59e2ef..09ad6e9bce4b 100644 --- a/sound/soc/codecs/madera.h +++ b/sound/soc/codecs/madera.h @@ -430,7 +430,7 @@ int madera_init_bus_error_irq(struct madera_priv *priv, int dsp_num, irq_handler_t handler); void madera_free_bus_error_irq(struct madera_priv *priv, int dsp_num);
-int madera_init_dai(struct madera_priv *priv, int dai); +int madera_init_dai(struct madera_priv *priv, int id);
int madera_set_output_mode(struct snd_soc_component *component, int output, bool differential);
On Wed, Mar 10, 2021 at 06:43:24PM -0600, Pierre-Louis Bossart wrote:
cppcheck warning:
sound/soc/codecs/madera.c:3372:51: style:inconclusive: Function 'madera_init_dai' argument 2 names different: declaration 'dai' definition 'id'. [funcArgNamesDifferent] int madera_init_dai(struct madera_priv *priv, int id) ^ sound/soc/codecs/madera.h:433:51: note: Function 'madera_init_dai' argument 2 names different: declaration 'dai' definition 'id'. int madera_init_dai(struct madera_priv *priv, int dai); ^ sound/soc/codecs/madera.c:3372:51: note: Function 'madera_init_dai' argument 2 names different: declaration 'dai' definition 'id'. int madera_init_dai(struct madera_priv *priv, int id) ^
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com
Acked-by: Charles Keepax ckeepax@opensource.cirrus.com
Thanks, Charles
cppcheck complains about some members not being used, but it's really the entire structure that is never used anywhere.
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com --- sound/soc/codecs/wm2200.c | 7 ------- 1 file changed, 7 deletions(-)
diff --git a/sound/soc/codecs/wm2200.c b/sound/soc/codecs/wm2200.c index c62f7ad0022c..b0a6d31299bb 100644 --- a/sound/soc/codecs/wm2200.c +++ b/sound/soc/codecs/wm2200.c @@ -72,13 +72,6 @@ static const char *wm2200_core_supply_names[WM2200_NUM_CORE_SUPPLIES] = { "LDOVDD", };
-struct wm2200_fll { - int fref; - int fout; - int src; - struct completion lock; -}; - /* codec private data */ struct wm2200_priv { struct wm_adsp dsp[2];
On Wed, Mar 10, 2021 at 06:43:25PM -0600, Pierre-Louis Bossart wrote:
cppcheck complains about some members not being used, but it's really the entire structure that is never used anywhere.
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com
Acked-by: Charles Keepax ckeepax@opensource.cirrus.com
Thanks, Charles
cppcheck warnings:
sound/soc/codecs/wm8903.c:1552:11: style: Variable 'best_val' is assigned a value that is never used. [unreadVariable] best_val = ((clk_sys * 10) / bclk_divs[0].ratio) - bclk; ^ sound/soc/codecs/wm8903.c:1559:12: style: Variable 'best_val' is assigned a value that is never used. [unreadVariable] best_val = cur_val; ^
Indeed what matters in the code is the blck_div, the best_val is assigned but never tested or used.
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com --- sound/soc/codecs/wm8903.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c index 026603ae44ce..75f30154c809 100644 --- a/sound/soc/codecs/wm8903.c +++ b/sound/soc/codecs/wm8903.c @@ -1549,14 +1549,12 @@ static int wm8903_hw_params(struct snd_pcm_substream *substream, * BCLKs to clock out the samples). */ bclk_div = 0; - best_val = ((clk_sys * 10) / bclk_divs[0].ratio) - bclk; i = 1; while (i < ARRAY_SIZE(bclk_divs)) { cur_val = ((clk_sys * 10) / bclk_divs[i].ratio) - bclk; if (cur_val < 0) /* BCLK table is sorted */ break; bclk_div = i; - best_val = cur_val; i++; }
On Wed, Mar 10, 2021 at 06:43:26PM -0600, Pierre-Louis Bossart wrote:
cppcheck warnings:
sound/soc/codecs/wm8903.c:1552:11: style: Variable 'best_val' is assigned a value that is never used. [unreadVariable] best_val = ((clk_sys * 10) / bclk_divs[0].ratio) - bclk; ^ sound/soc/codecs/wm8903.c:1559:12: style: Variable 'best_val' is assigned a value that is never used. [unreadVariable] best_val = cur_val; ^
Indeed what matters in the code is the blck_div, the best_val is assigned but never tested or used.
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com
Acked-by: Charles Keepax ckeepax@opensource.cirrus.com
Thanks, Charles
cppcheck complains about shadowed variables:
sound/soc/codecs/wm8958-dsp2.c:926:27: style: Local variable 'control' shadows outer variable [shadowVariable]
struct snd_kcontrol_new control[] = { ^ sound/soc/codecs/wm8958-dsp2.c:900:17: note: Shadowed declaration struct wm8994 *control = wm8994->wm8994; ^ sound/soc/codecs/wm8958-dsp2.c:926:27: note: Shadow variable struct snd_kcontrol_new control[] = { ^ sound/soc/codecs/wm8958-dsp2.c:952:27: style: Local variable 'control' shadows outer variable [shadowVariable] struct snd_kcontrol_new control[] = { ^ sound/soc/codecs/wm8958-dsp2.c:900:17: note: Shadowed declaration struct wm8994 *control = wm8994->wm8994; ^ sound/soc/codecs/wm8958-dsp2.c:952:27: note: Shadow variable struct snd_kcontrol_new control[] = { ^ sound/soc/codecs/wm8958-dsp2.c:978:27: style: Local variable 'control' shadows outer variable [shadowVariable] struct snd_kcontrol_new control[] = { ^ sound/soc/codecs/wm8958-dsp2.c:900:17: note: Shadowed declaration struct wm8994 *control = wm8994->wm8994; ^ sound/soc/codecs/wm8958-dsp2.c:978:27: note: Shadow variable struct snd_kcontrol_new control[] = { ^ sound/soc/codecs/wm8958-dsp2.c:1006:27: style: Local variable 'control' shadows outer variable [shadowVariable] struct snd_kcontrol_new control[] = { ^ sound/soc/codecs/wm8958-dsp2.c:900:17: note: Shadowed declaration struct wm8994 *control = wm8994->wm8994; ^ sound/soc/codecs/wm8958-dsp2.c:1006:27: note: Shadow variable struct snd_kcontrol_new control[] = { ^
fix by adding a prefix related to each control.
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com --- sound/soc/codecs/wm8958-dsp2.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/sound/soc/codecs/wm8958-dsp2.c b/sound/soc/codecs/wm8958-dsp2.c index 3bce9a14f0f3..536339e43dc7 100644 --- a/sound/soc/codecs/wm8958-dsp2.c +++ b/sound/soc/codecs/wm8958-dsp2.c @@ -923,7 +923,7 @@ void wm8958_dsp2_init(struct snd_soc_component *component) component, wm8958_enh_eq_loaded);
if (pdata->num_mbc_cfgs) { - struct snd_kcontrol_new control[] = { + struct snd_kcontrol_new mbc_control[] = { SOC_ENUM_EXT("MBC Mode", wm8994->mbc_enum, wm8958_get_mbc_enum, wm8958_put_mbc_enum), }; @@ -942,14 +942,14 @@ void wm8958_dsp2_init(struct snd_soc_component *component) wm8994->mbc_enum.texts = wm8994->mbc_texts;
ret = snd_soc_add_component_controls(wm8994->hubs.component, - control, 1); + mbc_control, 1); if (ret != 0) dev_err(wm8994->hubs.component->dev, "Failed to add MBC mode controls: %d\n", ret); }
if (pdata->num_vss_cfgs) { - struct snd_kcontrol_new control[] = { + struct snd_kcontrol_new vss_control[] = { SOC_ENUM_EXT("VSS Mode", wm8994->vss_enum, wm8958_get_vss_enum, wm8958_put_vss_enum), }; @@ -968,14 +968,14 @@ void wm8958_dsp2_init(struct snd_soc_component *component) wm8994->vss_enum.texts = wm8994->vss_texts;
ret = snd_soc_add_component_controls(wm8994->hubs.component, - control, 1); + vss_control, 1); if (ret != 0) dev_err(wm8994->hubs.component->dev, "Failed to add VSS mode controls: %d\n", ret); }
if (pdata->num_vss_hpf_cfgs) { - struct snd_kcontrol_new control[] = { + struct snd_kcontrol_new hpf_control[] = { SOC_ENUM_EXT("VSS HPF Mode", wm8994->vss_hpf_enum, wm8958_get_vss_hpf_enum, wm8958_put_vss_hpf_enum), @@ -995,7 +995,7 @@ void wm8958_dsp2_init(struct snd_soc_component *component) wm8994->vss_hpf_enum.texts = wm8994->vss_hpf_texts;
ret = snd_soc_add_component_controls(wm8994->hubs.component, - control, 1); + hpf_control, 1); if (ret != 0) dev_err(wm8994->hubs.component->dev, "Failed to add VSS HPFmode controls: %d\n", @@ -1003,7 +1003,7 @@ void wm8958_dsp2_init(struct snd_soc_component *component) }
if (pdata->num_enh_eq_cfgs) { - struct snd_kcontrol_new control[] = { + struct snd_kcontrol_new eq_control[] = { SOC_ENUM_EXT("Enhanced EQ Mode", wm8994->enh_eq_enum, wm8958_get_enh_eq_enum, wm8958_put_enh_eq_enum), @@ -1023,7 +1023,7 @@ void wm8958_dsp2_init(struct snd_soc_component *component) wm8994->enh_eq_enum.texts = wm8994->enh_eq_texts;
ret = snd_soc_add_component_controls(wm8994->hubs.component, - control, 1); + eq_control, 1); if (ret != 0) dev_err(wm8994->hubs.component->dev, "Failed to add enhanced EQ controls: %d\n",
On Wed, Mar 10, 2021 at 06:43:27PM -0600, Pierre-Louis Bossart wrote:
cppcheck complains about shadowed variables:
sound/soc/codecs/wm8958-dsp2.c:926:27: style: Local variable 'control' shadows outer variable [shadowVariable]
struct snd_kcontrol_new control[] = { ^ sound/soc/codecs/wm8958-dsp2.c:900:17: note: Shadowed declaration struct wm8994 *control = wm8994->wm8994; ^ sound/soc/codecs/wm8958-dsp2.c:926:27: note: Shadow variable struct snd_kcontrol_new control[] = { ^ sound/soc/codecs/wm8958-dsp2.c:952:27: style: Local variable 'control' shadows outer variable [shadowVariable] struct snd_kcontrol_new control[] = { ^ sound/soc/codecs/wm8958-dsp2.c:900:17: note: Shadowed declaration struct wm8994 *control = wm8994->wm8994; ^ sound/soc/codecs/wm8958-dsp2.c:952:27: note: Shadow variable struct snd_kcontrol_new control[] = { ^ sound/soc/codecs/wm8958-dsp2.c:978:27: style: Local variable 'control' shadows outer variable [shadowVariable] struct snd_kcontrol_new control[] = { ^ sound/soc/codecs/wm8958-dsp2.c:900:17: note: Shadowed declaration struct wm8994 *control = wm8994->wm8994; ^ sound/soc/codecs/wm8958-dsp2.c:978:27: note: Shadow variable struct snd_kcontrol_new control[] = { ^ sound/soc/codecs/wm8958-dsp2.c:1006:27: style: Local variable 'control' shadows outer variable [shadowVariable] struct snd_kcontrol_new control[] = { ^ sound/soc/codecs/wm8958-dsp2.c:900:17: note: Shadowed declaration struct wm8994 *control = wm8994->wm8994; ^ sound/soc/codecs/wm8958-dsp2.c:1006:27: note: Shadow variable struct snd_kcontrol_new control[] = { ^
fix by adding a prefix related to each control.
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com
Acked-by: Charles Keepax ckeepax@opensource.cirrus.com
Thanks, Charles
cppcheck warning:
sound/soc/codecs/wm8978.c:727:57: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] enum wm8978_sysclk_src current_clk_id = clking & 0x100 ? ^
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com --- sound/soc/codecs/wm8978.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/wm8978.c b/sound/soc/codecs/wm8978.c index 4b5ecd142249..7091e1a9d516 100644 --- a/sound/soc/codecs/wm8978.c +++ b/sound/soc/codecs/wm8978.c @@ -724,7 +724,7 @@ static int wm8978_hw_params(struct snd_pcm_substream *substream, /* Sampling rate mask = 0xe (for filters) */ u16 add_ctl = snd_soc_component_read(component, WM8978_ADDITIONAL_CONTROL) & ~0xe; u16 clking = snd_soc_component_read(component, WM8978_CLOCKING); - enum wm8978_sysclk_src current_clk_id = clking & 0x100 ? + enum wm8978_sysclk_src current_clk_id = (clking & 0x100) ? WM8978_PLL : WM8978_MCLK; unsigned int f_sel, diff, diff_best = INT_MAX; int i, best = 0;
On Wed, Mar 10, 2021 at 06:43:28PM -0600, Pierre-Louis Bossart wrote:
cppcheck warning:
sound/soc/codecs/wm8978.c:727:57: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] enum wm8978_sysclk_src current_clk_id = clking & 0x100 ? ^
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com
Acked-by: Charles Keepax ckeepax@opensource.cirrus.com
Thanks, Charles
cppcheck warning:
sound/soc/codecs/wm8994.c:3923:26: style:inconclusive: Function 'wm8958_mic_detect' argument 3 names different: declaration 'cb' definition 'det_cb'. [funcArgNamesDifferent] wm1811_micdet_cb det_cb, void *det_cb_data, ^ sound/soc/codecs/wm8994.h:53:26: note: Function 'wm8958_mic_detect' argument 3 names different: declaration 'cb' definition 'det_cb'. wm1811_micdet_cb cb, void *det_cb_data, ^ sound/soc/codecs/wm8994.c:3923:26: note: Function 'wm8958_mic_detect' argument 3 names different: declaration 'cb' definition 'det_cb'. wm1811_micdet_cb det_cb, void *det_cb_data, ^
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com --- sound/soc/codecs/wm8994.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/wm8994.h b/sound/soc/codecs/wm8994.h index 41c4b126114d..bc584b17bf28 100644 --- a/sound/soc/codecs/wm8994.h +++ b/sound/soc/codecs/wm8994.h @@ -50,7 +50,7 @@ typedef void (*wm1811_mic_id_cb)(void *data, u16 status); int wm8994_mic_detect(struct snd_soc_component *component, struct snd_soc_jack *jack, int micbias); int wm8958_mic_detect(struct snd_soc_component *component, struct snd_soc_jack *jack, - wm1811_micdet_cb cb, void *det_cb_data, + wm1811_micdet_cb det_cb, void *det_cb_data, wm1811_mic_id_cb id_cb, void *id_cb_data);
int wm8994_vmid_mode(struct snd_soc_component *component, enum wm8994_vmid_mode mode);
On Wed, Mar 10, 2021 at 06:43:29PM -0600, Pierre-Louis Bossart wrote:
cppcheck warning:
sound/soc/codecs/wm8994.c:3923:26: style:inconclusive: Function 'wm8958_mic_detect' argument 3 names different: declaration 'cb' definition 'det_cb'. [funcArgNamesDifferent] wm1811_micdet_cb det_cb, void *det_cb_data, ^ sound/soc/codecs/wm8994.h:53:26: note: Function 'wm8958_mic_detect' argument 3 names different: declaration 'cb' definition 'det_cb'. wm1811_micdet_cb cb, void *det_cb_data, ^ sound/soc/codecs/wm8994.c:3923:26: note: Function 'wm8958_mic_detect' argument 3 names different: declaration 'cb' definition 'det_cb'. wm1811_micdet_cb det_cb, void *det_cb_data, ^
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com
Acked-by: Charles Keepax ckeepax@opensource.cirrus.com
Thanks, Charles
cppcheck warning: sound/soc/codecs/wm8996.c:2109:23: style: Clarify calculation precedence for '/' and '?'. [clarifyCalculation] timeout = timeout/2 ? : 1; ^
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com --- sound/soc/codecs/wm8996.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c index d303ef7571e9..197ae7d84a49 100644 --- a/sound/soc/codecs/wm8996.c +++ b/sound/soc/codecs/wm8996.c @@ -2106,7 +2106,7 @@ static int wm8996_set_fll(struct snd_soc_component *component, int fll_id, int s timeout *= 10; else /* ensure timeout of atleast 1 jiffies */ - timeout = timeout/2 ? : 1; + timeout = (timeout/2) ? : 1;
for (retry = 0; retry < 10; retry++) { time_left = wait_for_completion_timeout(&wm8996->fll_lock,
On Wed, Mar 10, 2021 at 06:43:30PM -0600, Pierre-Louis Bossart wrote:
cppcheck warning: sound/soc/codecs/wm8996.c:2109:23: style: Clarify calculation precedence for '/' and '?'. [clarifyCalculation] timeout = timeout/2 ? : 1; ^
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com
Acked-by: Charles Keepax ckeepax@opensource.cirrus.com
Thanks, Charles
cppcheck warning:
sound/soc/codecs/wm_adsp.c:2092:9: warning: Identical condition and return expression 'ret', return value is always 0 [identicalConditionAfterEarlyExit] return ret; ^ sound/soc/codecs/wm_adsp.c:2070:6: note: If condition 'ret' is true, the function will return/exit if (ret) ^ sound/soc/codecs/wm_adsp.c:2092:9: note: Returning identical expression 'ret' return ret; ^
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com --- sound/soc/codecs/wm_adsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index 070ca7d8c661..3dc119daf2f6 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c @@ -2079,7 +2079,7 @@ int wm_adsp_write_ctl(struct wm_adsp *dsp, const char *name, int type, snd_ctl_notify(dsp->component->card->snd_card, SNDRV_CTL_EVENT_MASK_VALUE, &kcontrol->id);
- return ret; + return 0; } EXPORT_SYMBOL_GPL(wm_adsp_write_ctl);
On Wed, Mar 10, 2021 at 06:43:31PM -0600, Pierre-Louis Bossart wrote:
cppcheck warning:
sound/soc/codecs/wm_adsp.c:2092:9: warning: Identical condition and return expression 'ret', return value is always 0 [identicalConditionAfterEarlyExit] return ret; ^ sound/soc/codecs/wm_adsp.c:2070:6: note: If condition 'ret' is true, the function will return/exit if (ret) ^ sound/soc/codecs/wm_adsp.c:2092:9: note: Returning identical expression 'ret' return ret; ^
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com
Acked-by: Charles Keepax ckeepax@opensource.cirrus.com
Thanks, Charles
cppcheck warnings:
sound/soc/codecs/wm_hubs.c:1194:11: style:inconclusive: Function 'wm_hubs_handle_analogue_pdata' argument 8 names different: declaration 'micbias1_dly' definition 'micbias1_delay'. [funcArgNamesDifferent] int micbias1_delay, int micbias2_delay, ^ sound/soc/codecs/wm_hubs.h:59:11: note: Function 'wm_hubs_handle_analogue_pdata' argument 8 names different: declaration 'micbias1_dly' definition 'micbias1_delay'. int micbias1_dly, int micbias2_dly, ^ sound/soc/codecs/wm_hubs.c:1194:11: note: Function 'wm_hubs_handle_analogue_pdata' argument 8 names different: declaration 'micbias1_dly' definition 'micbias1_delay'. int micbias1_delay, int micbias2_delay, ^ sound/soc/codecs/wm_hubs.c:1194:31: style:inconclusive: Function 'wm_hubs_handle_analogue_pdata' argument 9 names different: declaration 'micbias2_dly' definition 'micbias2_delay'. [funcArgNamesDifferent] int micbias1_delay, int micbias2_delay, ^ sound/soc/codecs/wm_hubs.h:59:29: note: Function 'wm_hubs_handle_analogue_pdata' argument 9 names different: declaration 'micbias2_dly' definition 'micbias2_delay'. int micbias1_dly, int micbias2_dly, ^ sound/soc/codecs/wm_hubs.c:1194:31: note: Function 'wm_hubs_handle_analogue_pdata' argument 9 names different: declaration 'micbias2_dly' definition 'micbias2_delay'. int micbias1_delay, int micbias2_delay, ^
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com --- sound/soc/codecs/wm_hubs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/wm_hubs.h b/sound/soc/codecs/wm_hubs.h index 988b29e63060..a4ed9bd31426 100644 --- a/sound/soc/codecs/wm_hubs.h +++ b/sound/soc/codecs/wm_hubs.h @@ -56,7 +56,7 @@ extern int wm_hubs_handle_analogue_pdata(struct snd_soc_component *, int lineout1_diff, int lineout2_diff, int lineout1fb, int lineout2fb, int jd_scthr, int jd_thr, - int micbias1_dly, int micbias2_dly, + int micbias1_delay, int micbias2_delay, int micbias1_lvl, int micbias2_lvl);
extern irqreturn_t wm_hubs_dcs_done(int irq, void *data);
On Wed, Mar 10, 2021 at 06:43:32PM -0600, Pierre-Louis Bossart wrote:
cppcheck warnings:
sound/soc/codecs/wm_hubs.c:1194:11: style:inconclusive: Function 'wm_hubs_handle_analogue_pdata' argument 8 names different: declaration 'micbias1_dly' definition 'micbias1_delay'. [funcArgNamesDifferent] int micbias1_delay, int micbias2_delay, ^ sound/soc/codecs/wm_hubs.h:59:11: note: Function 'wm_hubs_handle_analogue_pdata' argument 8 names different: declaration 'micbias1_dly' definition 'micbias1_delay'. int micbias1_dly, int micbias2_dly, ^ sound/soc/codecs/wm_hubs.c:1194:11: note: Function 'wm_hubs_handle_analogue_pdata' argument 8 names different: declaration 'micbias1_dly' definition 'micbias1_delay'. int micbias1_delay, int micbias2_delay, ^ sound/soc/codecs/wm_hubs.c:1194:31: style:inconclusive: Function 'wm_hubs_handle_analogue_pdata' argument 9 names different: declaration 'micbias2_dly' definition 'micbias2_delay'. [funcArgNamesDifferent] int micbias1_delay, int micbias2_delay, ^ sound/soc/codecs/wm_hubs.h:59:29: note: Function 'wm_hubs_handle_analogue_pdata' argument 9 names different: declaration 'micbias2_dly' definition 'micbias2_delay'. int micbias1_dly, int micbias2_dly, ^ sound/soc/codecs/wm_hubs.c:1194:31: note: Function 'wm_hubs_handle_analogue_pdata' argument 9 names different: declaration 'micbias2_dly' definition 'micbias2_delay'. int micbias1_delay, int micbias2_delay, ^
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com
Acked-by: Charles Keepax ckeepax@opensource.cirrus.com
Thanks, Charles
On Wed, 10 Mar 2021 18:43:22 -0600, Pierre-Louis Bossart wrote:
There should be no functionality change, just minor fixes to make warnings go away.
Pierre-Louis Bossart (10): ASoC: arizona: fix function argument ASoC: madera: align function prototype ASoC: wm2200: remove unused structure ASoC: wm8903: remove useless assignments ASoC: wm8958-dsp2: rename local 'control' arrays ASoC: wm8978: clarify expression ASoC: wm8994: align function prototype ASoC: wm8996: clarify expression ASoC: wm_adsp: simplify return value ASoC: wm_hubs: align function prototype
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[01/10] ASoC: arizona: fix function argument commit: 4988f0cc254a1955d5c3244298055f5f7b538e6b [02/10] ASoC: madera: align function prototype commit: b6021b5623b93da05375ae8060f8e8d5dcae0ba9 [03/10] ASoC: wm2200: remove unused structure commit: 43fe3fe8b31685ccb2e248799ce3e9f9a15938fb [04/10] ASoC: wm8903: remove useless assignments commit: 13119a311aeb5a91ea751f10e4158a86361c2f08 [05/10] ASoC: wm8958-dsp2: rename local 'control' arrays commit: d28a9dfeb8071b9ac0e79c8b8b4a0111c3b54c70 [06/10] ASoC: wm8978: clarify expression commit: 729d42a4ab1a7bc9f4b5c37c57a3a4270333351f [07/10] ASoC: wm8994: align function prototype commit: b564fdb756918557fb4ca5086e67929bd2eafdd6 [08/10] ASoC: wm8996: clarify expression commit: ea80d4991b76dc101b87228b74515d818ff03bcd [09/10] ASoC: wm_adsp: simplify return value commit: 492df5b0748ada592119dc19dd713e4a60c4e69f [10/10] ASoC: wm_hubs: align function prototype commit: 8ea9e29cc7fc966885018628e123f4113f1ce4b2
All 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
participants (3)
-
Charles Keepax
-
Mark Brown
-
Pierre-Louis Bossart