[PATCH 0/7] ASoC: ti: Cleanup locking code using guard() helpers

phucduc.bui@gmail.com posted 7 patches 1 month ago
sound/soc/ti/ams-delta.c     | 26 ++++++++---------
sound/soc/ti/j721e-evm.c     | 25 ++++++-----------
sound/soc/ti/omap-dmic.c     | 44 ++++++++++++-----------------
sound/soc/ti/omap-hdmi.c     | 18 +++++-------
sound/soc/ti/omap-mcbsp-st.c | 26 ++++++-----------
sound/soc/ti/omap-mcbsp.c    | 54 ++++++++++++++++--------------------
sound/soc/ti/omap-mcpdm.c    |  8 ++----
7 files changed, 81 insertions(+), 120 deletions(-)
[PATCH 0/7] ASoC: ti: Cleanup locking code using guard() helpers
Posted by phucduc.bui@gmail.com 1 month ago
From: bui duc phuc <phucduc.bui@gmail.com>

Hi all,

This series converts mutex and spinlock handling in TI ASoC drivers
to use guard() helpers.

Most patches are straightforward conversions to guard() helpers.
Two patches include minor cleanup changes in the process:

omap-dmic: Simplified omap_dmic_dai_startup() by removing the
temporary return variable and using a direct return path on error.

omap-mcbsp: Modernized omap_mcbsp_request() by using __free(kfree) 
for memory management. This ensures that memory is always freed on 
error paths after the spinlock is released, without needing manual 
goto labels.

No behavior change intended.

Best regards,
Phuc

bui duc phuc (7):
  ASoC: ti: j721e-evm: Use guard() for mutex locks
  ASoC: ti: omap-dmic: Use guard() for mutex locks
  ASoC: ti: omap-hdmi: Use guard() for mutex locks
  ASoC: ti: omap-mcpdm: Use guard() for mutex locks
  ASoC: ti: ams-delta: Use guard() for spin locks
  ASoC: ti: omap-mcbsp-st: Use guard() for spin locks
  ASoC: ti: omap-mcbsp: Simplify lock and resource handling

 sound/soc/ti/ams-delta.c     | 26 ++++++++---------
 sound/soc/ti/j721e-evm.c     | 25 ++++++-----------
 sound/soc/ti/omap-dmic.c     | 44 ++++++++++++-----------------
 sound/soc/ti/omap-hdmi.c     | 18 +++++-------
 sound/soc/ti/omap-mcbsp-st.c | 26 ++++++-----------
 sound/soc/ti/omap-mcbsp.c    | 54 ++++++++++++++++--------------------
 sound/soc/ti/omap-mcpdm.c    |  8 ++----
 7 files changed, 81 insertions(+), 120 deletions(-)

-- 
2.43.0
Re: [PATCH 0/7] ASoC: ti: Cleanup locking code using guard() helpers
Posted by Mark Brown 1 month ago
On Fri, 08 May 2026 17:38:30 +0700, phucduc.bui@gmail.com wrote:
> ASoC: ti: Cleanup locking code using guard() helpers
> 
> From: bui duc phuc <phucduc.bui@gmail.com>
> 
> Hi all,
> 
> This series converts mutex and spinlock handling in TI ASoC drivers
> to use guard() helpers.
> 
> [...]

Applied to

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

Thanks!

[1/7] ASoC: ti: j721e-evm: Use guard() for mutex locks
      https://git.kernel.org/broonie/sound/c/6f4cf77320ae
[2/7] ASoC: ti: omap-dmic: Use guard() for mutex locks
      https://git.kernel.org/broonie/sound/c/bc59728f9349
[3/7] ASoC: ti: omap-hdmi: Use guard() for mutex locks
      https://git.kernel.org/broonie/sound/c/59115f79acd2
[4/7] ASoC: ti: omap-mcpdm: Use guard() for mutex locks
      https://git.kernel.org/broonie/sound/c/70031e9ad601
[5/7] ASoC: ti: ams-delta: Use guard() for spin locks
      https://git.kernel.org/broonie/sound/c/a8217778be47
[6/7] ASoC: ti: omap-mcbsp-st: Use guard() for spin locks
      https://git.kernel.org/broonie/sound/c/d94e794e8294
[7/7] ASoC: ti: omap-mcbsp: Simplify lock and resource handling
      https://git.kernel.org/broonie/sound/c/822f67bc269d

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
Re: [PATCH 0/7] ASoC: ti: Cleanup locking code using guard() helpers
Posted by Jarkko Nikula 1 month ago
On 08/05/2026 1:38 pm, phucduc.bui@gmail.com wrote:
> From: bui duc phuc <phucduc.bui@gmail.com>
>
> Hi all,
>
> This series converts mutex and spinlock handling in TI ASoC drivers
> to use guard() helpers.
>
> Most patches are straightforward conversions to guard() helpers.
> Two patches include minor cleanup changes in the process:
>
> omap-dmic: Simplified omap_dmic_dai_startup() by removing the
> temporary return variable and using a direct return path on error.
>
> omap-mcbsp: Modernized omap_mcbsp_request() by using __free(kfree) 
> for memory management. This ensures that memory is always freed on 
> error paths after the spinlock is released, without needing manual 
> goto labels.
>
> No behavior change intended.
For this set + Tested-by tags for the patches 6 and 7:

Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>