From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B16FC38A02 for ; Mon, 31 Oct 2022 01:18:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229795AbiJaBSR (ORCPT ); Sun, 30 Oct 2022 21:18:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229544AbiJaBSP (ORCPT ); Sun, 30 Oct 2022 21:18:15 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5348E9FDA; Sun, 30 Oct 2022 18:18:14 -0700 (PDT) Received: from dggpemm500024.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4N0wBd1smlzmVbK; Mon, 31 Oct 2022 09:13:13 +0800 (CST) Received: from dggpemm500013.china.huawei.com (7.185.36.172) by dggpemm500024.china.huawei.com (7.185.36.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 31 Oct 2022 09:17:57 +0800 Received: from [10.67.108.67] (10.67.108.67) by dggpemm500013.china.huawei.com (7.185.36.172) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 31 Oct 2022 09:17:57 +0800 Message-ID: <09aa678e-b072-d567-5e8a-fdd58d761871@huawei.com> Date: Mon, 31 Oct 2022 09:17:53 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.0 Subject: Re: linux-next: build warning after merge of the sound-asoc-fixes tree To: Stephen Rothwell , Mark Brown , Liam Girdwood CC: Linux Kernel Mailing List , "Linux Next Mailing List" References: <20221031083917.6944b95b@canb.auug.org.au> Content-Language: en-US From: Chen Zhongjin In-Reply-To: <20221031083917.6944b95b@canb.auug.org.au> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.108.67] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm500013.china.huawei.com (7.185.36.172) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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