Commit 6f2cd36f authored by Mark Brown's avatar Mark Brown

Merge series "ASoC: codecs: wolfson: remove cppcheck warnings" from...

Merge series "ASoC: codecs: wolfson: remove cppcheck warnings" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

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(-)

--
2.25.1
parents c68fded7 8ea9e29c
......@@ -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);
......
......@@ -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);
......
......@@ -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];
......
......@@ -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++;
}
......
......@@ -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",
......
......@@ -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;
......
......@@ -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);
......
......@@ -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,
......
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment