mbox series

[0/6] ASoC: Few constifications (mostly arguments)

Message ID 20240617-n-asoc-const-auto-selectable-formats-v1-0-8004f346ee38@linaro.org
Headers show
Series ASoC: Few constifications (mostly arguments) | expand

Message

Krzysztof Kozlowski June 17, 2024, 1:03 p.m. UTC
Make few pointers in ASoC functions as pointers to const, so the code is
clearer to read, a bit safer and allows further constifications (e.g.
placing some data as rodata).

Best regards,
Krzysztof

---
Krzysztof Kozlowski (6):
      ASoC: Constify of_phandle_args in snd_soc_dai_driver
      ASoC: Constify of_phandle_args in snd_soc_dai_link_component
      ASoC: Constify passed data to core function
      ASoC: Constify DAI passed to get_channel_map
      ASoC: Constify return of snd_soc_dai_get_pcm_stream()
      ALSA: Cleanup trailing white-spaces

 include/sound/soc-dai.h            | 26 +++++++------
 include/sound/soc.h                | 19 +++++-----
 sound/core/control_compat.c        |  2 +-
 sound/core/device.c                |  4 +-
 sound/core/hwdep.c                 | 10 ++---
 sound/core/init.c                  |  3 +-
 sound/core/memalloc.c              |  2 +-
 sound/core/memory.c                |  2 +-
 sound/core/pcm.c                   | 22 +++++------
 sound/core/pcm_compat.c            |  2 +-
 sound/core/pcm_lib.c               | 41 ++++++++++----------
 sound/core/pcm_misc.c              |  2 +-
 sound/core/pcm_native.c            | 76 +++++++++++++++++++-------------------
 sound/core/seq_device.c            |  2 +-
 sound/soc/codecs/lpass-rx-macro.c  |  2 +-
 sound/soc/codecs/lpass-tx-macro.c  |  2 +-
 sound/soc/codecs/lpass-va-macro.c  |  2 +-
 sound/soc/codecs/lpass-wsa-macro.c |  2 +-
 sound/soc/codecs/wcd9335.c         |  2 +-
 sound/soc/codecs/wcd934x.c         |  2 +-
 sound/soc/intel/avs/pcm.c          |  4 +-
 sound/soc/soc-core.c               |  4 +-
 sound/soc/soc-dai.c                | 14 +++----
 sound/soc/soc-pcm.c                | 26 ++++++-------
 sound/soc/soc-utils.c              |  8 ++--
 25 files changed, 141 insertions(+), 140 deletions(-)
---
base-commit: cf32e2eb8404572eaacd219dde4e703fad349299
change-id: 20240617-n-asoc-const-auto-selectable-formats-13fcc5000044

Best regards,

Comments

Krzysztof Kozlowski June 18, 2024, 6:28 a.m. UTC | #1
On 17/06/2024 17:11, Mark Brown wrote:
> On Mon, Jun 17, 2024 at 03:03:18PM +0200, Krzysztof Kozlowski wrote:
>> Make few pointers in ASoC functions as pointers to const, so the code is
>> clearer to read, a bit safer and allows further constifications (e.g.
>> placing some data as rodata).
>>
>> Best regards,
>> Krzysztof
>>
>> ---
>> Krzysztof Kozlowski (6):
>>       ASoC: Constify of_phandle_args in snd_soc_dai_driver
>>       ASoC: Constify of_phandle_args in snd_soc_dai_link_component
>>       ASoC: Constify passed data to core function
>>       ASoC: Constify DAI passed to get_channel_map
>>       ASoC: Constify return of snd_soc_dai_get_pcm_stream()
>>       ALSA: Cleanup trailing white-spaces
> 
> Why is this random ALSA patch which seems off topic for the rest of the
> series mixed in here?

While checking all possible references around ASoC PCM, I apparently
ended up there and spotted things to improve. No dependencies, I should
sent it separately.

Best regards,
Krzysztof