diff options
author | Mark Brown <broonie@kernel.org> | 2021-03-01 23:31:52 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-03-10 13:08:33 +0000 |
commit | 3766623b5c44968298955eceb25d29967b593f42 (patch) | |
tree | 7ce5e22e41c117430b89b68c011d7b2d6c0b1cdd | |
parent | d59748076b89bd895d313008912db6a02b7ed33a (diff) | |
parent | b7e41867a4c9e3613494fbda1c5995f9ed39f3f1 (diff) |
Merge series "ASoC: sh: remove cppcheck warnings" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
No functional changes except for patch 4 where a missing error check
was added for consistency.
Pierre-Louis Bossart (8):
ASoC: sh: dma-sh7760: remove unused variable
ASoC: sh: rcar: align function prototypes
ASoC: sh: rcar: simplify return
ASoC: sh: rcar: core: rename shadowing variables
ASoC: sh: rcar: ctu: add missing error check
ASoC: sh: rcar: ssi: remove redundant assignment
ASoC: sh: siu_pcm: remove useless assignment
ASoC: sh: siu_pcm: remove unused variable
sound/soc/sh/dma-sh7760.c | 1 -
sound/soc/sh/rcar/core.c | 14 +++++++-------
sound/soc/sh/rcar/ctu.c | 2 ++
sound/soc/sh/rcar/rsnd.h | 6 +++---
sound/soc/sh/rcar/ssi.c | 1 -
sound/soc/sh/siu_pcm.c | 6 +-----
6 files changed, 13 insertions(+), 17 deletions(-)
--
2.25.1
-rw-r--r-- | sound/soc/sh/dma-sh7760.c | 1 | ||||
-rw-r--r-- | sound/soc/sh/rcar/core.c | 2 | ||||
-rw-r--r-- | sound/soc/sh/rcar/ctu.c | 2 | ||||
-rw-r--r-- | sound/soc/sh/rcar/rsnd.h | 6 | ||||
-rw-r--r-- | sound/soc/sh/rcar/ssi.c | 1 | ||||
-rw-r--r-- | sound/soc/sh/siu_pcm.c | 6 |
6 files changed, 7 insertions, 11 deletions
diff --git a/sound/soc/sh/dma-sh7760.c b/sound/soc/sh/dma-sh7760.c index b70068dd5a06..121e48f984c5 100644 --- a/sound/soc/sh/dma-sh7760.c +++ b/sound/soc/sh/dma-sh7760.c @@ -177,7 +177,6 @@ static int camelot_hw_params(struct snd_soc_component *component, struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); struct camelot_pcm *cam = &cam_pcm_data[asoc_rtd_to_cpu(rtd, 0)->id]; int recv = substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? 0:1; - int ret; if (recv) { cam->rx_period_size = params_period_bytes(hw_params); diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index 1029d8d9d800..a07c77dd5250 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c @@ -216,7 +216,7 @@ int rsnd_mod_init(struct rsnd_priv *priv, mod->clk = clk; mod->priv = priv; - return ret; + return 0; } void rsnd_mod_quit(struct rsnd_mod *mod) diff --git a/sound/soc/sh/rcar/ctu.c b/sound/soc/sh/rcar/ctu.c index 7647b3d4c0ba..20eecd088d13 100644 --- a/sound/soc/sh/rcar/ctu.c +++ b/sound/soc/sh/rcar/ctu.c @@ -207,6 +207,8 @@ static int rsnd_ctu_pcm_new(struct rsnd_mod *mod, NULL, &ctu->pass, RSND_MAX_CHANNELS, 0xC); + if (ret < 0) + return ret; /* ROW0 */ ret = rsnd_kctrl_new_m(mod, io, rtd, "CTU SV0", diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h index 6b519370fd64..1255a85151db 100644 --- a/sound/soc/sh/rcar/rsnd.h +++ b/sound/soc/sh/rcar/rsnd.h @@ -597,15 +597,15 @@ phys_addr_t rsnd_gen_get_phy_addr(struct rsnd_priv *priv, int reg_id); * R-Car ADG */ int rsnd_adg_clk_query(struct rsnd_priv *priv, unsigned int rate); -int rsnd_adg_ssi_clk_stop(struct rsnd_mod *mod); -int rsnd_adg_ssi_clk_try_start(struct rsnd_mod *mod, unsigned int rate); +int rsnd_adg_ssi_clk_stop(struct rsnd_mod *ssi_mod); +int rsnd_adg_ssi_clk_try_start(struct rsnd_mod *ssi_mod, unsigned int rate); int rsnd_adg_probe(struct rsnd_priv *priv); void rsnd_adg_remove(struct rsnd_priv *priv); int rsnd_adg_set_src_timesel_gen2(struct rsnd_mod *src_mod, struct rsnd_dai_stream *io, unsigned int in_rate, unsigned int out_rate); -int rsnd_adg_set_cmd_timsel_gen2(struct rsnd_mod *mod, +int rsnd_adg_set_cmd_timsel_gen2(struct rsnd_mod *cmd_mod, struct rsnd_dai_stream *io); #define rsnd_adg_clk_enable(priv) rsnd_adg_clk_control(priv, 1) #define rsnd_adg_clk_disable(priv) rsnd_adg_clk_control(priv, 0) diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c index d0ded427a836..659b25992ff2 100644 --- a/sound/soc/sh/rcar/ssi.c +++ b/sound/soc/sh/rcar/ssi.c @@ -400,7 +400,6 @@ static void rsnd_ssi_config_init(struct rsnd_mod *mod, * see * rsnd_ssiu_init_gen2() */ - wsr = ssi->wsr; if (is_tdm || is_tdm_split) { wsr |= WS_MODE; cr_own |= CHNL_8; diff --git a/sound/soc/sh/siu_pcm.c b/sound/soc/sh/siu_pcm.c index 4785886df4f0..0a8a3c314a73 100644 --- a/sound/soc/sh/siu_pcm.c +++ b/sound/soc/sh/siu_pcm.c @@ -217,14 +217,10 @@ static void siu_io_work(struct work_struct *work) if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { dma_addr_t buff; size_t count; - u8 *virt; buff = (dma_addr_t)PERIOD_OFFSET(rt->dma_addr, siu_stream->cur_period, siu_stream->period_bytes); - virt = PERIOD_OFFSET(rt->dma_area, - siu_stream->cur_period, - siu_stream->period_bytes); count = siu_stream->period_bytes; /* DMA transfer start */ @@ -363,7 +359,7 @@ static int siu_pcm_prepare(struct snd_soc_component *component, struct siu_info *info = siu_i2s_data; struct siu_port *port_info = siu_port_info(ss); struct device *dev = ss->pcm->card->dev; - struct snd_pcm_runtime *rt = ss->runtime; + struct snd_pcm_runtime *rt; struct siu_stream *siu_stream; snd_pcm_sframes_t xfer_cnt; |