mbox series

[v2,0/7,RESEND] ASoC: merge soc_pcm_open() rollback and soc_pcm_close()

Message ID 87mu1abwp2.wl-kuninori.morimoto.gx@renesas.com
Headers show
Series ASoC: merge soc_pcm_open() rollback and soc_pcm_close() | expand

Message

Kuninori Morimoto Sept. 28, 2020, midnight UTC
Hi Mark

1 month past and nothing happened.
This is resend of v2 patch-set.

soc_pcm_open() does rollback when failed (A),
but, it is almost same as soc_pcm_close().

	static int soc_pcm_open(xxx)
	{
		...
		if (ret < 0)
			goto xxx_err;
		...
		return 0;

 ^	config_err:
 |		...
 |	rtd_startup_err:
(A)		...
 |	component_err:
 |		...
 v		return ret;
	}

This kind of duplicated code can be a hotbed of bugs,
thus, this patch-set share soc_pcm_close() and rollback.

v1 -> v2
	- indicate more detail background/logic on git-log

Link: https://lore.kernel.org/r/87wo2oku0m.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/87wo1kvozz.wl-kuninori.morimoto.gx@renesas.com

Kuninori Morimoto (7):
  ASoC: soc-dai: add mark for snd_soc_dai_startup/shutdown()
  ASoC: soc-link: add mark for snd_soc_link_startup/shutdown()
  ASoC: soc-component: add mark for soc_pcm_components_open/close()
  ASoC: soc-component: add mark for
    snd_soc_pcm_component_pm_runtime_get/put()
  ASoC: soc-pcm: add soc_pcm_clean() and call it from
    soc_pcm_open/close()
  ASoC: soc-pcm: remove unneeded dev_err() for snd_soc_dai_startup()
  ASoC: soc-pcm: remove unneeded dev_err() for
    snd_soc_component_module/open()

 include/sound/soc-component.h |  28 +++++---
 include/sound/soc-dai.h       |   5 +-
 include/sound/soc-link.h      |   3 +-
 include/sound/soc.h           |   3 +
 sound/soc/soc-component.c     |  73 ++++++++++++++++++++-
 sound/soc/soc-compress.c      |  30 +++------
 sound/soc/soc-dai.c           |  21 +++++-
 sound/soc/soc-dapm.c          |   4 +-
 sound/soc/soc-link.c          |  21 +++++-
 sound/soc/soc-pcm.c           | 120 ++++++++++++----------------------
 10 files changed, 190 insertions(+), 118 deletions(-)

Comments

Mark Brown Sept. 28, 2020, 7:35 p.m. UTC | #1
On 28 Sep 2020 09:00:14 +0900, Kuninori Morimoto wrote:
> 1 month past and nothing happened.
> This is resend of v2 patch-set.
> 
> soc_pcm_open() does rollback when failed (A),
> but, it is almost same as soc_pcm_close().
> 
> 	static int soc_pcm_open(xxx)
> 	{
> 		...
> 		if (ret < 0)
> 			goto xxx_err;
> 		...
> 		return 0;
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/7] ASoC: soc-dai: add mark for snd_soc_dai_startup/shutdown()
      commit: 00a0b46c99e26b30ea27c1fb4f4dbdfc6f8b1c49
[2/7] ASoC: soc-link: add mark for snd_soc_link_startup/shutdown()
      commit: 6064ed73cd2405d13c252b190ac64c03ab40e4b9
[3/7] ASoC: soc-component: add mark for soc_pcm_components_open/close()
      commit: 51aff91ad123e03d1461ec1d980efd1814dca69e
[4/7] ASoC: soc-component: add mark for snd_soc_pcm_component_pm_runtime_get/put()
      commit: 939a5cfb2a5609d2d6f996b5cd853397a82a92b9
[5/7] ASoC: soc-pcm: add soc_pcm_clean() and call it from soc_pcm_open/close()
      commit: 140a4532cdb8c44a664e7e871ea5dbaa4c2829bc
[6/7] ASoC: soc-pcm: remove unneeded dev_err() for snd_soc_dai_startup()
      commit: ce820145a9ec04797a417fcb01b8ff02dcfd9846
[7/7] ASoC: soc-pcm: remove unneeded dev_err() for snd_soc_component_module/open()
      commit: bcae16317bcfa45f6b767cf59e02e9cc72715d27

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
Mark Brown Sept. 28, 2020, 7:55 p.m. UTC | #2
On 28 Sep 2020 09:00:14 +0900, Kuninori Morimoto wrote:
> 1 month past and nothing happened.
> This is resend of v2 patch-set.
> 
> soc_pcm_open() does rollback when failed (A),
> but, it is almost same as soc_pcm_close().
> 
> 	static int soc_pcm_open(xxx)
> 	{
> 		...
> 		if (ret < 0)
> 			goto xxx_err;
> 		...
> 		return 0;
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/7] ASoC: soc-dai: add mark for snd_soc_dai_startup/shutdown()
      commit: 00a0b46c99e26b30ea27c1fb4f4dbdfc6f8b1c49
[2/7] ASoC: soc-link: add mark for snd_soc_link_startup/shutdown()
      commit: 6064ed73cd2405d13c252b190ac64c03ab40e4b9
[3/7] ASoC: soc-component: add mark for soc_pcm_components_open/close()
      commit: 51aff91ad123e03d1461ec1d980efd1814dca69e
[4/7] ASoC: soc-component: add mark for snd_soc_pcm_component_pm_runtime_get/put()
      commit: 939a5cfb2a5609d2d6f996b5cd853397a82a92b9
[5/7] ASoC: soc-pcm: add soc_pcm_clean() and call it from soc_pcm_open/close()
      commit: 140a4532cdb8c44a664e7e871ea5dbaa4c2829bc
[6/7] ASoC: soc-pcm: remove unneeded dev_err() for snd_soc_dai_startup()
      commit: ce820145a9ec04797a417fcb01b8ff02dcfd9846
[7/7] ASoC: soc-pcm: remove unneeded dev_err() for snd_soc_component_module/open()
      commit: bcae16317bcfa45f6b767cf59e02e9cc72715d27

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