aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2021-03-19 16:31:39 +0000
committerMark Brown <broonie@kernel.org>2021-03-19 16:31:39 +0000
commit3722e4ecefb38a62a98a798653685078de475e75 (patch)
treeb8b690fd5d31263d250bbc39f707ba17056c5517 /include
parentASoC: rt1019: make symbol 'rt1019_i2c_driver' static (diff)
parentASoC: don't indicate error message for snd_soc_[pcm_]component_xxx() (diff)
downloadwireguard-linux-3722e4ecefb38a62a98a798653685078de475e75.tar.xz
wireguard-linux-3722e4ecefb38a62a98a798653685078de475e75.zip
Merge series "ASoC: tidyup error message timing" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
Hi Mark Indicating error message when failed case is very useful for debuging. In many case, it uses below style. int function(...) { ... return ret; } int caller(...) { ... ret = function(...); if (ret < 0) dev_err(...) ... } This is not so bad, but in this style *each caller* needs to indicate duplicate same error message, and some caller is forgetting to do it. And caller can't indicate detail function() error information. I know many people have many opinion, but if function() indicates error message, we can get same and detail information without forgot, and it is better. This patch-set tidyup to do it. int function(...) { ... if (ret < 0) dev_err(...) return ret; } int caller(...) { ... ret = function(...); ... } Kuninori Morimoto (14): ASoC: soc-pcm: indicate error message at soc_pcm_open() ASoC: soc-pcm: indicate error message at soc_pcm_hw_params() ASoC: soc-pcm: indicate error message at soc_pcm_prepare() ASoC: soc-pcm: indicate error message at dpcm_path_get() ASoC: soc-pcm: indicate error message at dpcm_be_dai_trigger() ASoC: soc-pcm: indicate error message at dpcm_apply_symmetry() ASoC: soc-pcm: indicate error message at dpcm_run_update_startup/shutdown() ASoC: soc-pcm: indicate error message at dpcm_fe/be_dai_startup() ASoC: soc-pcm: indicate error message at dpcm_fe/be_dai_hw_params() ASoC: soc-pcm: indicate error message at dpcm_fe/be_dai_prepare() ASoC: soc-pcm: don't indicate error message for soc_pcm_hw_free() ASoC: soc-pcm: don't indicate error message for dpcm_be_dai_hw_free() ASoC: don't indicate error message for snd_soc_[pcm_]dai_xxx() ASoC: don't indicate error message for snd_soc_[pcm_]component_xxx() include/sound/soc-dpcm.h | 2 +- sound/soc/soc-compress.c | 9 +- sound/soc/soc-core.c | 22 +---- sound/soc/soc-dapm.c | 24 ++--- sound/soc/soc-pcm.c | 197 +++++++++++++++++++-------------------- 5 files changed, 108 insertions(+), 146 deletions(-) -- 2.25.1
Diffstat (limited to 'include')
-rw-r--r--include/sound/soc-dpcm.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sound/soc-dpcm.h b/include/sound/soc-dpcm.h
index d76cb1eeeaca..e296a3949b18 100644
--- a/include/sound/soc-dpcm.h
+++ b/include/sound/soc-dpcm.h
@@ -153,7 +153,7 @@ void dpcm_be_dai_stop(struct snd_soc_pcm_runtime *fe, int stream,
int do_hw_free, struct snd_soc_dpcm *last);
void dpcm_be_disconnect(struct snd_soc_pcm_runtime *fe, int stream);
void dpcm_clear_pending_state(struct snd_soc_pcm_runtime *fe, int stream);
-int dpcm_be_dai_hw_free(struct snd_soc_pcm_runtime *fe, int stream);
+void dpcm_be_dai_hw_free(struct snd_soc_pcm_runtime *fe, int stream);
int dpcm_be_dai_hw_params(struct snd_soc_pcm_runtime *fe, int tream);
int dpcm_be_dai_trigger(struct snd_soc_pcm_runtime *fe, int stream, int cmd);
int dpcm_be_dai_prepare(struct snd_soc_pcm_runtime *fe, int stream);