mbox series

[00/11] ASoC: Simplify code with cleanup.h

Message ID 20240703-asoc-cleanup-h-v1-0-71219dfd0aef@linaro.org
Headers show
Series ASoC: Simplify code with cleanup.h | expand

Message

Krzysztof Kozlowski July 3, 2024, 12:10 p.m. UTC
Allocate the memory with scoped/cleanup.h to reduce error handling
(simpler error paths) and make the code a bit smaller.

Best regards,
Krzysztof

---
Krzysztof Kozlowski (11):
      ASoC: codecs: audio-iio-aux: Simplify audio_iio_aux_add_dapms() with cleanup.h
      ASoC: codecs: audio-iio-aux: Simplify audio_iio_aux_probe() with cleanup.h
      ASoC: codecs: wcd9335: Simplify with cleanup.h
      ASoC: codecs: wcd934x: Simplify with cleanup.h
      ASoC: simple-card-utils: Simplify with cleanup.h
      ASoC: audio-graph-card: Use cleanup.h instead of devm_kfree()
      ASoC: audio-graph-card2: Use cleanup.h instead of devm_kfree()
      ASoC: simple-card: Use cleanup.h instead of devm_kfree()
      ASoC: ops: Simplify with cleanup.h
      ASoC: dapm: Simplify dapm_cnew_widget() with cleanup.h
      ASoC: dapm: Simplify snd_soc_dai_link_event_pre_pmu() with cleanup.h

 sound/soc/codecs/audio-iio-aux.c      | 83 ++++++++++++-----------------------
 sound/soc/codecs/wcd9335.c            | 22 ++++------
 sound/soc/codecs/wcd934x.c            | 22 ++++------
 sound/soc/generic/audio-graph-card.c  |  5 +--
 sound/soc/generic/audio-graph-card2.c |  5 +--
 sound/soc/generic/simple-card-utils.c | 13 +++---
 sound/soc/generic/simple-card.c       |  5 +--
 sound/soc/soc-dapm.c                  | 47 ++++++++------------
 sound/soc/soc-ops.c                   | 26 +++++------
 9 files changed, 87 insertions(+), 141 deletions(-)
---
base-commit: cf601827c51b0496f6bb8a1865f1bf69ebd246b7
change-id: 20240703-asoc-cleanup-h-ef9cbfb67b66

Best regards,

Comments

Kuninori Morimoto July 4, 2024, 2:53 a.m. UTC | #1
Hi

> Allocate the memory with scoped/cleanup.h, instead of devm interface, to
> make the code more obvious that memory is not used outside this scope.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---

Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Thank you for your help !!

Best regards
---
Kuninori Morimoto
Kuninori Morimoto July 4, 2024, 2:53 a.m. UTC | #2
Hi

> Allocate the memory with scoped/cleanup.h, instead of devm interface, to
> make the code more obvious that memory is not used outside this scope.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---

Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>


Thank you for your help !!

Best regards
---
Kuninori Morimoto
Mark Brown July 8, 2024, 4:56 p.m. UTC | #3
On Wed, 03 Jul 2024 14:10:54 +0200, Krzysztof Kozlowski wrote:
> Allocate the memory with scoped/cleanup.h to reduce error handling
> (simpler error paths) and make the code a bit smaller.
> 
> Best regards,
> Krzysztof
> 

Applied to

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

Thanks!

[01/11] ASoC: codecs: audio-iio-aux: Simplify audio_iio_aux_add_dapms() with cleanup.h
        commit: 408e49381750ca22fc584a37636f5035d2cd4c25
[02/11] ASoC: codecs: audio-iio-aux: Simplify audio_iio_aux_probe() with cleanup.h
        commit: f9cbfb66127bfc2a47dece3dfcdab2b79ab06c50
[03/11] ASoC: codecs: wcd9335: Simplify with cleanup.h
        commit: 6344ab5d0826640799e0c054ed4c0846b3f87ccb
[04/11] ASoC: codecs: wcd934x: Simplify with cleanup.h
        commit: 56d426f5525d1ad919e20663ad01a58238652df7
[05/11] ASoC: simple-card-utils: Simplify with cleanup.h
        commit: 6440e7b2a058c50a05ebcc58f35693c50522fc1a
[06/11] ASoC: audio-graph-card: Use cleanup.h instead of devm_kfree()
        commit: 5725c16af2678d334de0bcb85b42cfa50b32e04c
[07/11] ASoC: audio-graph-card2: Use cleanup.h instead of devm_kfree()
        commit: b39f7713ece62b2b0a3cfad7a75a0eb0ab71aa4e
[08/11] ASoC: simple-card: Use cleanup.h instead of devm_kfree()
        commit: 7d996c8a5fea700e816379e57f4983e2611519a0
[09/11] ASoC: ops: Simplify with cleanup.h
        commit: 1a7b846818210cbdf8994bfee1340c09342a5b3b
[10/11] ASoC: dapm: Simplify dapm_cnew_widget() with cleanup.h
        commit: 5b3cc85673bcc7bb961a3a6fa229cbc4fe0441ac
[11/11] ASoC: dapm: Simplify snd_soc_dai_link_event_pre_pmu() with cleanup.h
        commit: 522133d4401010d936b0588a5a975c2c965cb88e

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