public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Chen Zhongjin <chenzhongjin@huawei•com>
To: Stephen Rothwell <sfr@canb•auug.org.au>,
	Mark Brown <broonie@kernel•org>,
	Liam Girdwood <lgirdwood@gmail•com>
Cc: Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
	"Linux Next Mailing List" <linux-next@vger•kernel.org>
Subject: Re: linux-next: build warning after merge of the sound-asoc-fixes tree
Date: Mon, 31 Oct 2022 09:17:53 +0800	[thread overview]
Message-ID: <09aa678e-b072-d567-5e8a-fdd58d761871@huawei.com> (raw)
In-Reply-To: <20221031083917.6944b95b@canb.auug.org.au>

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

  reply	other threads:[~2022-10-31  1:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-30 21:39 linux-next: build warning after merge of the sound-asoc-fixes tree Stephen Rothwell
2022-10-31  1:17 ` Chen Zhongjin [this message]
2022-11-06 21:43 ` Stephen Rothwell
2022-11-07  3:03   ` Chen Zhongjin
2022-11-07  3:52     ` Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2025-01-09  4:25 Stephen Rothwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=09aa678e-b072-d567-5e8a-fdd58d761871@huawei.com \
    --to=chenzhongjin@huawei$(echo .)com \
    --cc=broonie@kernel$(echo .)org \
    --cc=lgirdwood@gmail$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=sfr@canb$(echo .)auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox