Re: linux-next: build warning after merge of the sound-asoc-fixes tree

From: Chen Zhongjin
Date: Sun Oct 30 2022 - 21:18:43 EST


Hi,

On 2022/10/31 5:39, Stephen Rothwell wrote:
Hi all,

After merging the sound-asoc-fixes tree, today's linux-next build (arm
multi_v7_defconfig) produced this warning:

WARNING: modpost: sound/soc/snd-soc-core.o: section mismatch in reference: init_module (section: .init.text) -> snd_soc_util_exit (section: .exit.text)

Introduced by commit

6ec27c53886c ("ASoC: core: Fix use-after-free in snd_soc_exit()")
It's because I called "_exit snd_soc_util_exit()" inside "_init snd_soc_init()".

Since snd_soc_util_exit is only used in snd_soc_init() and snd_soc_exit(), I think it's fine to remove _exit for snd_soc_util_exit().

Could you please add this change for the patch?


diff --git a/sound/soc/soc-utils.c b/sound/soc/soc-utils.c
index a3b6df2378b4..a4dba0b751e7 100644
--- a/sound/soc/soc-utils.c
+++ b/sound/soc/soc-utils.c
@@ -264,7 +264,7 @@ int __init snd_soc_util_init(void)
        return ret;
 }

-void __exit snd_soc_util_exit(void)
+void snd_soc_util_exit(void)
 {
        platform_driver_unregister(&soc_dummy_driver);
        platform_device_unregister(soc_dummy_dev);


Thanks!

Best,

Chen