The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH v3 00/24] ASoC: codecs: Use guard() for mutex & spin lock - part 1
@ 2026-07-07  5:09 phucduc.bui
  2026-07-07  5:09 ` [PATCH v3 01/24] ASoC: codecs: ab8500: Use guard() for mutex locks phucduc.bui
                   ` (23 more replies)
  0 siblings, 24 replies; 28+ messages in thread
From: phucduc.bui @ 2026-07-07  5:09 UTC (permalink / raw)
  To: Mark Brown, Takashi Iwai, Tzung-Bi Shih, David Rhodes,
	Charles Keepax
  Cc: Liam Girdwood, Jaroslav Kysela, Cheng-Yi Chiang, Guenter Roeck,
	Benson Leung, Richard Fitzgerald, povik+lin, u.kleine-koenig,
	kuninori.morimoto.gx, christian.ehrhardt, Linus Walleij,
	Arnd Bergmann, Sakari Ailus, Thorsten Blum, Chris Morgan,
	Dan Carpenter, Marco Crivellari, Rosen Penev, Weidong Wang,
	Teguh Sobirin, Val Packett, Luca Weiss, wangdicheng, linux-sound,
	linux-kernel, patches, chrome-platform, asahi, Cezary Rojewski,
	bui duc phuc

From: bui duc phuc <phucduc.bui@gmail.com>

Hi all,

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

This series is split out from a larger 78-patch series to improve
reviewability and allow for incremental review:
https://lore.kernel.org/all/20260617103235.449609-1-phucduc.bui@gmail.com/

The changes are purely refactoring and have no functional impact.

Compile-tested only.

Link v1:
https://lore.kernel.org/all/20260626061329.23264-1-phucduc.bui@gmail.com/
Link v2:
https://lore.kernel.org/all/20260703055355.244898-1-phucduc.bui@gmail.com/

Changes in v2:
 - Added Reviewed-by tags from Charles and Richard.
 - Incorporated Charles's review comments:
 +  cs48l32: Removed the unnecessary else block so update_bits() 
    is not called when no changes are needed. 
 +  cs42l43: Switched to a helper function to avoid code duplication, 
    while keeping the guard() conversion since it eliminates 12 goto 
    labels.
 +  arizona-jack: Reworked the code to use an if/else structure, 
    avoiding code duplication after removing the goto label.

Changes in v3:
 - Added Reviewed-by tags from Charles and Cezary.
 - Incorporated review comments from Richard, Charles, and Cezary:
 + Remove unnecessary blank lines in arizona-jack and cs35l56.
 + Remove temporary variables and return directly in cs42l43 and cs35l56.
 
Best regards,
Phuc

bui duc phuc (24):
  ASoC: codecs: ab8500: Use guard() for mutex locks
  ASoC: codecs: ak4613: Use guard() for mutex locks
  ASoC: codecs: arizona-jack: Use guard() cleanup helpers
  ASoC: codecs: arizona: Use guard() for mutex locks
  ASoC: codecs: aw87390: Use guard() for mutex locks
  ASoC: codecs: aw88081: Use guard() for mutex locks
  ASoC: codecs: aw88166: Use guard() for mutex locks
  ASoC: codecs: aw88261: Use guard() for mutex locks
  ASoC: codecs: aw88395: Use guard() for mutex locks
  ASoC: codecs: aw88399: Use guard() for mutex locks
  ASoC: codecs: cros_ec_codec: Use guard() for mutex locks
  ASoC: codecs: cs-amp-lib: Use guard() for mutex locks
  ASoC: codecs: cs35l56: Use guard() and PM runtime scope helpers
  ASoC: codecs: cs42l42: Use guard() cleanup helpers
  ASoC: codecs: cs42l43: Use guard() and PM runtime scope helpers
  ASoC: codecs: cs42l84: Use guard() for mutex locks
  ASoC: codecs: cs43130: Use guard() for mutex locks
  ASoC: codecs: cs47l15: Use guard() for mutex locks
  ASoC: codecs: cs47l35: Use guard() for mutex locks
  ASoC: codecs: cs47l85: Use guard() for mutex locks
  ASoC: codecs: cs47l90: Use guard() for mutex locks
  ASoC: codecs: cs47l92: Use guard() for mutex locks
  ASoC: codecs: cs48l32: Use guard() for mutex locks
  ASoC: codecs: cs2072x: Use guard() for mutex locks

 sound/soc/codecs/ab8500-codec.c           |  12 +-
 sound/soc/codecs/ak4613.c                 |  83 +++++++------
 sound/soc/codecs/arizona-jack.c           | 117 +++++++++---------
 sound/soc/codecs/arizona.c                |  26 ++--
 sound/soc/codecs/aw87390.c                |  10 +-
 sound/soc/codecs/aw88081.c                |  18 +--
 sound/soc/codecs/aw88166.c                |  24 ++--
 sound/soc/codecs/aw88261.c                |  21 ++--
 sound/soc/codecs/aw88395/aw88395.c        |  24 ++--
 sound/soc/codecs/aw88395/aw88395_device.c |  40 +++----
 sound/soc/codecs/aw88399.c                |  15 +--
 sound/soc/codecs/cros_ec_codec.c          |  18 ++-
 sound/soc/codecs/cs-amp-lib.c             |  11 +-
 sound/soc/codecs/cs35l56-shared.c         |  22 ++--
 sound/soc/codecs/cs42l42.c                |  54 ++++-----
 sound/soc/codecs/cs42l43-jack.c           | 138 ++++++++++------------
 sound/soc/codecs/cs42l43.c                |  16 +--
 sound/soc/codecs/cs42l84.c                |  10 +-
 sound/soc/codecs/cs43130.c                |  72 +++++------
 sound/soc/codecs/cs47l15.c                |  11 +-
 sound/soc/codecs/cs47l35.c                |  11 +-
 sound/soc/codecs/cs47l85.c                |  11 +-
 sound/soc/codecs/cs47l90.c                |  11 +-
 sound/soc/codecs/cs47l92.c                |  11 +-
 sound/soc/codecs/cs48l32.c                |  26 ++--
 sound/soc/codecs/cx2072x.c                |   5 +-
 26 files changed, 353 insertions(+), 464 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2026-07-07  8:41 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-07  5:09 [PATCH v3 00/24] ASoC: codecs: Use guard() for mutex & spin lock - part 1 phucduc.bui
2026-07-07  5:09 ` [PATCH v3 01/24] ASoC: codecs: ab8500: Use guard() for mutex locks phucduc.bui
2026-07-07  5:09 ` [PATCH v3 02/24] ASoC: codecs: ak4613: " phucduc.bui
2026-07-07  5:09 ` [PATCH v3 03/24] ASoC: codecs: arizona-jack: Use guard() cleanup helpers phucduc.bui
2026-07-07  5:09 ` [PATCH v3 04/24] ASoC: codecs: arizona: Use guard() for mutex locks phucduc.bui
2026-07-07  5:09 ` [PATCH v3 05/24] ASoC: codecs: aw87390: " phucduc.bui
2026-07-07  5:09 ` [PATCH v3 06/24] ASoC: codecs: aw88081: " phucduc.bui
2026-07-07  5:09 ` [PATCH v3 07/24] ASoC: codecs: aw88166: " phucduc.bui
2026-07-07  5:09 ` [PATCH v3 08/24] ASoC: codecs: aw88261: " phucduc.bui
2026-07-07  5:09 ` [PATCH v3 09/24] ASoC: codecs: aw88395: " phucduc.bui
2026-07-07  5:09 ` [PATCH v3 10/24] ASoC: codecs: aw88399: " phucduc.bui
2026-07-07  5:09 ` [PATCH v3 11/24] ASoC: codecs: cros_ec_codec: " phucduc.bui
2026-07-07  5:09 ` [PATCH v3 12/24] ASoC: codecs: cs-amp-lib: " phucduc.bui
2026-07-07  5:09 ` [PATCH v3 13/24] ASoC: codecs: cs35l56: Use guard() and PM runtime scope helpers phucduc.bui
2026-07-07  8:30   ` Richard Fitzgerald
2026-07-07  5:09 ` [PATCH v3 14/24] ASoC: codecs: cs42l42: Use guard() cleanup helpers phucduc.bui
2026-07-07  5:09 ` [PATCH v3 15/24] ASoC: codecs: cs42l43: Use guard() and PM runtime scope helpers phucduc.bui
2026-07-07  8:38   ` Charles Keepax
2026-07-07  5:09 ` [PATCH v3 16/24] ASoC: codecs: cs42l84: Use guard() for mutex locks phucduc.bui
2026-07-07  5:09 ` [PATCH v3 17/24] ASoC: codecs: cs43130: " phucduc.bui
2026-07-07  8:40   ` Charles Keepax
2026-07-07  5:10 ` [PATCH v3 18/24] ASoC: codecs: cs47l15: " phucduc.bui
2026-07-07  5:10 ` [PATCH v3 19/24] ASoC: codecs: cs47l35: " phucduc.bui
2026-07-07  5:10 ` [PATCH v3 20/24] ASoC: codecs: cs47l85: " phucduc.bui
2026-07-07  5:10 ` [PATCH v3 21/24] ASoC: codecs: cs47l90: " phucduc.bui
2026-07-07  5:10 ` [PATCH v3 22/24] ASoC: codecs: cs47l92: " phucduc.bui
2026-07-07  5:10 ` [PATCH v3 23/24] ASoC: codecs: cs48l32: " phucduc.bui
2026-07-07  5:10 ` [PATCH v3 24/24] ASoC: codecs: cs2072x: " phucduc.bui

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox