[alsa-devel] [PATCH 00/11] add add for_each_xx() macro

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Tue Sep 18 03:26:40 CEST 2018


Hi Mark

Current ALSA SoC is using many list_for_each_entry()
and/or for() loop for each lists.
But, these need to use same pattern, and it is not readable.

Now, "codec list loop for rtd", and "codec list loop for dai_link"
had been replaced to for_each_xxx() macro.
These patches replace "xxx list loop for yyy" by using
for_each_yyy_xxx() macro.

# Maybe some of them are overkill replacement, and/or
# using not good naming. I'm happy to get feedback

1) -  2) : fixup previous for_each_xxx() macro patch
3) - 11) : new for_each_xxx() macro

Kuninori Morimoto (11):
   1) ASoC: convert for_each_rtd_codec_dai() for missing part
   2) ASoC: rename for_each_rtd_codec_dai_reverse to rollback
   3) ASoC: add for_each_card_prelinks() macro
   4) ASoC: add for_each_card_links() macro
   5) ASoC: add for_each_card_rtds() macro
   6) ASoC: add for_each_card_components() macro
   7) ASoC: add for_each_component_all() macro
   8) ASoC: add for_each_component_dais() macro
   9) ASoC: add for_each_comp_order() macro
  10) ASoC: add for_each_dpcm_fe() macro
  11) ASoC: add for_each_dpcm_be() macro

 include/sound/soc-dpcm.h                         |  10 ++
 include/sound/soc.h                              |  29 ++++-
 sound/soc/codecs/hdac_hdmi.c                     |   2 +-
 sound/soc/fsl/fsl_asrc_dma.c                     |   2 +-
 sound/soc/fsl/pcm030-audio-fabric.c              |   5 +-
 sound/soc/generic/simple-card-utils.c            |   6 +-
 sound/soc/intel/atom/sst-mfld-platform-pcm.c     |   4 +-
 sound/soc/intel/boards/broadwell.c               |   4 +-
 sound/soc/intel/boards/bytcr_rt5640.c            |   4 +-
 sound/soc/intel/boards/bytcr_rt5651.c            |   4 +-
 sound/soc/intel/boards/cht_bsw_rt5672.c          |   4 +-
 sound/soc/intel/boards/skl_hda_dsp_generic.c     |   5 +-
 sound/soc/mediatek/mt2701/mt2701-cs42448.c       |  13 +--
 sound/soc/mediatek/mt2701/mt2701-wm8960.c        |  13 +--
 sound/soc/mediatek/mt6797/mt6797-mt6351.c        |  13 +--
 sound/soc/mediatek/mt8173/mt8173-max98090.c      |  13 +--
 sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c |   7 +-
 sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c |   7 +-
 sound/soc/mediatek/mt8173/mt8173-rt5650.c        |   7 +-
 sound/soc/meson/axg-card.c                       |   3 +-
 sound/soc/qcom/apq8096.c                         |   7 +-
 sound/soc/qcom/sdm845.c                          |   7 +-
 sound/soc/samsung/tm2_wm5110.c                   |  13 +--
 sound/soc/sh/rcar/ctu.c                          |   2 +-
 sound/soc/sh/rcar/src.c                          |   2 +-
 sound/soc/soc-compress.c                         |   4 +-
 sound/soc/soc-core.c                             | 130 +++++++++++------------
 sound/soc/soc-dapm.c                             |   2 +-
 sound/soc/soc-pcm.c                              | 101 +++++++++---------
 29 files changed, 230 insertions(+), 193 deletions(-)

-- 
2.7.4



More information about the Alsa-devel mailing list