* [PATCH] ASoC: fix oops w/ for_each_rtd_codec_dai_rollback() macro
@ 2018-10-26 21:54 Pierre-Louis Bossart
2018-10-30 15:35 ` Applied "ASoC: fix oops w/ for_each_rtd_codec_dai_rollback() macro" to the asoc tree Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Pierre-Louis Bossart @ 2018-10-26 21:54 UTC (permalink / raw)
To: alsa-devel; +Cc: tiwai, broonie, Pierre-Louis Bossart, Kuninori Morimoto
A kernel oops happens on an error case (usual missing BE mixer
configuration required by Intel SST driver). Git bisect points to this
macro and an operator precedence issue.
for (; ((i--) >= 0) && ((dai) = rtd->codec_dais[i]);)
The initial code replaced by this macro was
while (--i >= 0) {
codec_dai = rtd->codec_dais[i];
Fix the C operator precedence difference by reverting to pre-decrement
Fixes: 0b7990e3897 ('ASoC: add for_each_rtd_codec_dai() macro')
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
include/sound/soc.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/sound/soc.h b/include/sound/soc.h
index f1dab1f4b194..70c10a8f3e90 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -1192,7 +1192,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]);)
/* mixer control */
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Applied "ASoC: fix oops w/ for_each_rtd_codec_dai_rollback() macro" to the asoc tree
2018-10-26 21:54 [PATCH] ASoC: fix oops w/ for_each_rtd_codec_dai_rollback() macro Pierre-Louis Bossart
@ 2018-10-30 15:35 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2018-10-30 15:35 UTC (permalink / raw)
To: Pierre-Louis Bossart; +Cc: tiwai, alsa-devel, broonie, Kuninori Morimoto
The patch
ASoC: fix oops w/ for_each_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 23cb2d04db54535df65edbbebbca89f2590f08bd Mon Sep 17 00:00:00 2001
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Date: Fri, 26 Oct 2018 16:54:43 -0500
Subject: [PATCH] ASoC: fix oops w/ for_each_rtd_codec_dai_rollback() macro
A kernel oops happens on an error case (usual missing BE mixer
configuration required by Intel SST driver). Git bisect points to this
macro and an operator precedence issue.
for (; ((i--) >= 0) && ((dai) = rtd->codec_dais[i]);)
The initial code replaced by this macro was
while (--i >= 0) {
codec_dai = rtd->codec_dais[i];
Fix the C operator precedence difference by reverting to pre-decrement
Fixes: 0b7990e3897 ('ASoC: add for_each_rtd_codec_dai() macro')
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
include/sound/soc.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/sound/soc.h b/include/sound/soc.h
index f1dab1f4b194..70c10a8f3e90 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -1192,7 +1192,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]);)
/* mixer control */
--
2.19.0.rc2
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-10-30 15:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-26 21:54 [PATCH] ASoC: fix oops w/ for_each_rtd_codec_dai_rollback() macro Pierre-Louis Bossart
2018-10-30 15:35 ` Applied "ASoC: fix oops w/ for_each_rtd_codec_dai_rollback() macro" to the asoc tree Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.