Commit 192cf41f authored by Mark Brown's avatar Mark Brown

Merge series "ASoC: minor cleanup of warnings" from Pierre-Louis Bossart...

Merge series "ASoC: minor cleanup of warnings" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

Sparse, make W=1 and cppcheck all report minor warnings.

The only functional change is in patch7 where the error code is now
returned to the caller.

Pierre-Louis Bossart (8):
  ASoC: topology: handle endianness warning
  ASoC: rt5682s: use 'static' qualifier
  ASoC: nau8821: fix kernel-doc
  ASoC: nau8821: clarify out-of-bounds check
  ASoC: mediatek: remove unnecessary initialization
  ASoC: mediatek: mt8195: rename shadowed array
  ASoC: mediatek: mt8195: fix return value
  ASoC: rockchip: i2s_tdm: improve return value handling

 sound/soc/codecs/nau8821.c                  | 6 ++++--
 sound/soc/codecs/rt5682s.c                  | 6 +++---
 sound/soc/mediatek/common/mtk-afe-fe-dai.c  | 2 +-
 sound/soc/mediatek/mt8195/mt8195-afe-pcm.c  | 4 ++--
 sound/soc/mediatek/mt8195/mt8195-dai-etdm.c | 2 +-
 sound/soc/rockchip/rockchip_i2s_tdm.c       | 2 +-
 sound/soc/soc-topology.c                    | 2 +-
 7 files changed, 13 insertions(+), 11 deletions(-)

--
2.25.1
parents 709d2975 f9135821
......@@ -381,7 +381,7 @@ static int dmic_clock_control(struct snd_soc_dapm_widget *w,
speed_selection = dmic_speed_sel[i].val;
break;
}
if (speed_selection < 0)
if (i == 4)
return -EINVAL;
dev_dbg(nau8821->dev,
......@@ -1178,7 +1178,9 @@ static void nau8821_fll_apply(struct nau8821 *nau8821,
/**
* nau8821_set_fll - FLL configuration of nau8821
* @codec: codec component
* @component: codec component
* @pll_id: PLL requested
* @source: clock source
* @freq_in: frequency of input clock source
* @freq_out: must be 256*Fs in order to achieve the best performance
*
......
......@@ -41,7 +41,7 @@ static const struct rt5682s_platform_data i2s_default_platform_data = {
.dai_clk_names[RT5682S_DAI_BCLK_IDX] = "rt5682-dai-bclk",
};
const char *rt5682s_supply_names[RT5682S_NUM_SUPPLIES] = {
static const char *rt5682s_supply_names[RT5682S_NUM_SUPPLIES] = {
"AVDD",
"MICVDD",
};
......@@ -71,7 +71,7 @@ static void rt5682s_apply_patch_list(struct rt5682s_priv *rt5682s,
dev_warn(dev, "Failed to apply regmap patch: %d\n", ret);
}
const struct reg_default rt5682s_reg[] = {
static const struct reg_default rt5682s_reg[] = {
{0x0002, 0x8080},
{0x0003, 0x0001},
{0x0005, 0x0000},
......@@ -2838,7 +2838,7 @@ static int rt5682s_resume(struct snd_soc_component *component)
#define rt5682s_resume NULL
#endif
const struct snd_soc_dai_ops rt5682s_aif1_dai_ops = {
static const struct snd_soc_dai_ops rt5682s_aif1_dai_ops = {
.hw_params = rt5682s_hw_params,
.set_fmt = rt5682s_set_dai_fmt,
.set_tdm_slot = rt5682s_set_tdm_slot,
......
......@@ -350,7 +350,7 @@ int mtk_afe_resume(struct snd_soc_component *component)
struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component);
struct device *dev = afe->dev;
struct regmap *regmap = afe->regmap;
int i = 0;
int i;
if (pm_runtime_status_suspended(dev) || !afe->suspended)
return 0;
......
......@@ -2232,7 +2232,7 @@ static const struct mtk_base_memif_data memif_data[MT8195_AFE_MEMIF_NUM] = {
},
};
static const struct mtk_base_irq_data irq_data[MT8195_AFE_IRQ_NUM] = {
static const struct mtk_base_irq_data irq_data_array[MT8195_AFE_IRQ_NUM] = {
[MT8195_AFE_IRQ_1] = {
.id = MT8195_AFE_IRQ_1,
.irq_cnt_reg = -1,
......@@ -3100,7 +3100,7 @@ static int mt8195_afe_pcm_dev_probe(struct platform_device *pdev)
return -ENOMEM;
for (i = 0; i < afe->irqs_size; i++)
afe->irqs[i].irq_data = &irq_data[i];
afe->irqs[i].irq_data = &irq_data_array[i];
/* init memif */
afe->memif_size = MT8195_AFE_MEMIF_NUM;
......
......@@ -1316,7 +1316,7 @@ static int mt8195_afe_disable_etdm(struct mtk_base_afe *afe, int dai_id)
}
out:
spin_unlock_irqrestore(&afe_priv->afe_ctrl_lock, flags);
return 0;
return ret;
}
static int etdm_cowork_slv_sel(int id, int slave_mode)
......
......@@ -596,7 +596,7 @@ static int rockchip_i2s_tdm_clk_set_rate(struct rk_i2s_tdm_dev *i2s_tdm,
i2s_tdm->clk_ppm = ppm;
return ret;
return 0;
}
static int rockchip_i2s_tdm_calibrate_mclk(struct rk_i2s_tdm_dev *i2s_tdm,
......
......@@ -1485,7 +1485,7 @@ static int soc_tplg_dapm_widget_create(struct soc_tplg *tplg,
if (!kcontrol_type)
goto err;
for (i = 0; i < w->num_kcontrols; i++) {
for (i = 0; i < le32_to_cpu(w->num_kcontrols); i++) {
control_hdr = (struct snd_soc_tplg_ctl_hdr *)tplg->pos;
switch (le32_to_cpu(control_hdr->ops.info)) {
case SND_SOC_TPLG_CTL_VOLSW:
......
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