diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2019-10-25 09:56:10 +0900 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-10-25 11:06:35 +0100 |
commit | 4baabbf932ed4f97df8e18cf546d39b7c2138020 (patch) | |
tree | 85cef91da864ee4e499653f14c81746ef02153df /include/sound | |
parent | f3ee99087c8ca0ecfdd549ef5a94f557c42d5428 (diff) |
ASoC: soc-dpcm: tidyup for_each_dpcm_xx() macro
for_each_dpcm_xx() macro is using "dpcm" as parameter (1),
but, it is also struct member (2).
#define for_each_dpcm_fe(be, stream, dpcm) \
list_for_each_entry(dpcm, &(be)->dpcm[stream]...)
^^^^(1) ^^^^(2)
Thus, it will be compile error if user not used "dpcm" as parameter
for_each_dpcm_fe(be, stream, dp)
^^
This patch fixup it.
Reported-by: Pavel Machek <pavel@denx.de>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87tv7x7idx.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/soc-dpcm.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/include/sound/soc-dpcm.h b/include/sound/soc-dpcm.h index e55aeb00ce2d..b654ebfc8766 100644 --- a/include/sound/soc-dpcm.h +++ b/include/sound/soc-dpcm.h @@ -103,15 +103,15 @@ struct snd_soc_dpcm_runtime { int trigger_pending; /* trigger cmd + 1 if pending, 0 if not */ }; -#define for_each_dpcm_fe(be, stream, dpcm) \ - list_for_each_entry(dpcm, &(be)->dpcm[stream].fe_clients, list_fe) - -#define for_each_dpcm_be(fe, stream, dpcm) \ - list_for_each_entry(dpcm, &(fe)->dpcm[stream].be_clients, list_be) -#define for_each_dpcm_be_safe(fe, stream, dpcm, _dpcm) \ - list_for_each_entry_safe(dpcm, _dpcm, &(fe)->dpcm[stream].be_clients, list_be) -#define for_each_dpcm_be_rollback(fe, stream, dpcm) \ - list_for_each_entry_continue_reverse(dpcm, &(fe)->dpcm[stream].be_clients, list_be) +#define for_each_dpcm_fe(be, stream, _dpcm) \ + list_for_each_entry(_dpcm, &(be)->dpcm[stream].fe_clients, list_fe) + +#define for_each_dpcm_be(fe, stream, _dpcm) \ + list_for_each_entry(_dpcm, &(fe)->dpcm[stream].be_clients, list_be) +#define for_each_dpcm_be_safe(fe, stream, _dpcm, __dpcm) \ + list_for_each_entry_safe(_dpcm, __dpcm, &(fe)->dpcm[stream].be_clients, list_be) +#define for_each_dpcm_be_rollback(fe, stream, _dpcm) \ + list_for_each_entry_continue_reverse(_dpcm, &(fe)->dpcm[stream].be_clients, list_be) /* can this BE stop and free */ int snd_soc_dpcm_can_be_free_stop(struct snd_soc_pcm_runtime *fe, |