* [PATCH] ASoC: airoha: fix objtool warning with memif probe loop
@ 2026-11-24 23:12 Christian Marangi
0 siblings, 0 replies; only message in thread
From: Christian Marangi @ 2026-11-24 23:12 UTC (permalink / raw)
To: Christian Marangi, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Matthias Brugger, AngeloGioacchino Del Regno,
Nathan Chancellor, Nick Desaulniers, Bill Wendling, Justin Stitt,
linux-sound, linux-kernel, linux-arm-kernel, linux-mediatek,
llvm
Cc: kernel test robot
Objtool produce a warning when clang is used as compiler. This was caused
by the memif probe loop when assigning the irq to the memif.
The warning is:
>> sound/soc/mediatek/an7581/snd-soc-an7581-afe.o: warning: objtool: an7581_afe_pcm_dev_probe(): unexpected end of section .text.an7581_afe_pcm_dev_probe
Fix this by giving a fixed upper bound for the loop for the memif as it
seems there are some problem with detecting the runtime value is hardcoded.
Fixes: 4974ffa0d6c2 ("ASoC: airoha: Add AFE driver for Airoha AN7581")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202611201414.1NBNxorL-lkp@intel.com/
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
sound/soc/mediatek/an7581/an7581-afe-pcm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/mediatek/an7581/an7581-afe-pcm.c b/sound/soc/mediatek/an7581/an7581-afe-pcm.c
index d47edb630452..b17d58f25d9e 100644
--- a/sound/soc/mediatek/an7581/an7581-afe-pcm.c
+++ b/sound/soc/mediatek/an7581/an7581-afe-pcm.c
@@ -447,7 +447,7 @@ static int an7581_afe_pcm_dev_probe(struct platform_device *pdev)
return irq_id;
/* init memif */
- for (i = 0; i < afe->memif_size; i++) {
+ for (i = 0; i < AN7581_MEMIF_NUM; i++) {
int sel_irq = an7581_memif_irq_descs[i].irq;
afe->memif[i].data = &memif_data[i];
--
2.55.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-24 23:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-24 23:12 [PATCH] ASoC: airoha: fix objtool warning with memif probe loop Christian Marangi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®