ASoC: soc-core: fix for_rtd_codec_dai_rollback() macro
PATCH 1/1 ASoC: soc-core: fix for_rtd_codec_dai_rollback() macro
The use of parentheses to protect the argument is fine for (i)++ but not for (--i).
--- include/sound/soc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/sound/soc.h +1 -1
@@ -1157,7 +1157,7 @@ struct snd_soc_pcm_runtime { ((i) < rtd->num_codecs) && ((dai) = rtd->codec_dais[i]); \ (i)++)#define for_each_rtd_codec_dai_rollback (rtd, i, dai) \ - for (; ((--i) >= 0) && ((dai) = rtd->codec_dais[i]);) + for (; (--(i) >= 0) && ((dai) = rtd->codec_dais[i]);)void snd_soc_close_delayed_work (struct snd_soc_pcm_runtime *rtd);
Signature · 1 line
2.20.1
Hi Pierre-Louis
Thank you for your patch
Quoted 7 lines
The use of parentheses to protect the argument is fine for (i)++ but not for (--i).
Fixes 83f94a2e293d61 ("ASoC: soc-core: add snd_soc_close_delayed_work()")Cc Kuninori Morimoto <[email protected]>Signed-off-by Pierre-Louis Bossart <[email protected]>---
Yes, indeed.
Quoted 19 lines
include/sound/soc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/sound/soc.h +1
-1@@ -1157,7 +1157,7 @@ struct snd_soc_pcm_runtime { ((i) < rtd->num_codecs) && ((dai) = rtd->codec_dais[i]); \ (i)++)#define for_each_rtd_codec_dai_rollback (rtd, i, dai) \ - for (; ((--i) >= 0) && ((dai) = rtd->codec_dais[i]);) + for (; (--(i) >= 0) && ((dai) = rtd->codec_dais[i]);)void snd_soc_close_delayed_work (struct snd_soc_pcm_runtime *rtd);Signature · 1 line
2.20.1
Mark Brown
maintainerApplied "ASoC: soc-core: fix for_rtd_codec_dai_rollback() macro" to the asoc tree
In reply to Pierre-Louis BossartThe patch
ASoC: soc-core: fix for_rtd_codec_dai_rollback() macro
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
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
From 63d68382f5fb5f71772357e31841c19c4a133182 Mon Sep 17 00:00:00 2001
From: Pierre-Louis Bossart <[email protected]>
Date: Wed, 19 Feb 2020 16:21:30 -0600
Subject: [PATCH] ASoC: soc-core: fix for_rtd_codec_dai_rollback() macro
The use of parentheses to protect the argument is fine for (i)++ but not for (--i).
--- include/sound/soc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/sound/soc.h +1 -1
@@ -1157,7 +1157,7 @@ struct snd_soc_pcm_runtime { ((i) < rtd->num_codecs) && ((dai) = rtd->codec_dais[i]); \ (i)++)#define for_each_rtd_codec_dai_rollback (rtd, i, dai) \ - for (; ((--i) >= 0) && ((dai) = rtd->codec_dais[i]);) + for (; (--(i) >= 0) && ((dai) = rtd->codec_dais[i]);)void snd_soc_close_delayed_work (struct snd_soc_pcm_runtime *rtd);
Signature · 1 line
2.20.1