From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH] ASoC: SOF: Fix build error with CONFIG_SND_SOC_SOF_NOCODEC=m Date: Fri, 10 May 2019 09:12:52 +0200 Message-ID: References: <20190510023657.8960-1-yuehaibing@huawei.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <20190510023657.8960-1-yuehaibing@huawei.com> Sender: linux-kernel-owner@vger.kernel.org To: YueHaibing Cc: lgirdwood@gmail.com, rdunlap@infradead.org, broonie@kernel.org, pierre-louis.bossart@linux.intel.com, perex@perex.cz, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org List-Id: alsa-devel@alsa-project.org On Fri, 10 May 2019 04:36:57 +0200, YueHaibing wrote: > > Fix gcc build error while CONFIG_SND_SOC_SOF_NOCODEC=m > > sound/soc/sof/core.o: In function `snd_sof_device_probe': > core.c:(.text+0x4af): undefined reference to `sof_nocodec_setup' > > Change SND_SOC_SOF_NOCODEC to bool to fix this. > > Reported-by: Hulk Robot > Fixes: c16211d6226d ("ASoC: SOF: Add Sound Open Firmware driver core") > Signed-off-by: YueHaibing This change would break things severely. This won't allow to build it as a module any longer. A better fix would be to somehow restrict the SND_SOC_SOF_NOCODEC to align with SND_SOC_SOF, i.e. disallow SND_SOC_SOF=y && SND_SOC_SOF_NOCODEC=m. Because of the complex mix of select and depends-on in SOF, I'm afraid that it's not that trivial, though. There might be something I overlooked, hopefully... An easier alternative would be to replace IS_ENABLED(CONFIG_SND_SOC_SOF_NOCODEC) with IS_REACHABLE(CONFIG_SND_SOC_SOF_NOCODEC). This assures the condition at the build time, although the error at probe might be a surprising to some users that don't know this hidden dependency. thanks, Takashi > --- > sound/soc/sof/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sound/soc/sof/Kconfig b/sound/soc/sof/Kconfig > index b204c65..9c280c9 100644 > --- a/sound/soc/sof/Kconfig > +++ b/sound/soc/sof/Kconfig > @@ -44,7 +44,7 @@ config SND_SOC_SOF_OPTIONS > if SND_SOC_SOF_OPTIONS > > config SND_SOC_SOF_NOCODEC > - tristate "SOF nocodec mode Support" > + bool "SOF nocodec mode Support" > help > This adds support for a dummy/nocodec machine driver fallback > option if no known codec is detected. This is typically only > -- > 2.7.4 > > > 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 X-Spam-Level: X-Spam-Status: No, score=-6.9 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D234C04A6B for ; Fri, 10 May 2019 07:12:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 08650217D6 for ; Fri, 10 May 2019 07:12:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727131AbfEJHMy (ORCPT ); Fri, 10 May 2019 03:12:54 -0400 Received: from mx2.suse.de ([195.135.220.15]:57302 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726934AbfEJHMx (ORCPT ); Fri, 10 May 2019 03:12:53 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id A44D1AF1F; Fri, 10 May 2019 07:12:52 +0000 (UTC) Date: Fri, 10 May 2019 09:12:52 +0200 Message-ID: From: Takashi Iwai To: YueHaibing Cc: , , , , , , Subject: Re: [PATCH] ASoC: SOF: Fix build error with CONFIG_SND_SOC_SOF_NOCODEC=m In-Reply-To: <20190510023657.8960-1-yuehaibing@huawei.com> References: <20190510023657.8960-1-yuehaibing@huawei.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 10 May 2019 04:36:57 +0200, YueHaibing wrote: > > Fix gcc build error while CONFIG_SND_SOC_SOF_NOCODEC=m > > sound/soc/sof/core.o: In function `snd_sof_device_probe': > core.c:(.text+0x4af): undefined reference to `sof_nocodec_setup' > > Change SND_SOC_SOF_NOCODEC to bool to fix this. > > Reported-by: Hulk Robot > Fixes: c16211d6226d ("ASoC: SOF: Add Sound Open Firmware driver core") > Signed-off-by: YueHaibing This change would break things severely. This won't allow to build it as a module any longer. A better fix would be to somehow restrict the SND_SOC_SOF_NOCODEC to align with SND_SOC_SOF, i.e. disallow SND_SOC_SOF=y && SND_SOC_SOF_NOCODEC=m. Because of the complex mix of select and depends-on in SOF, I'm afraid that it's not that trivial, though. There might be something I overlooked, hopefully... An easier alternative would be to replace IS_ENABLED(CONFIG_SND_SOC_SOF_NOCODEC) with IS_REACHABLE(CONFIG_SND_SOC_SOF_NOCODEC). This assures the condition at the build time, although the error at probe might be a surprising to some users that don't know this hidden dependency. thanks, Takashi > --- > sound/soc/sof/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sound/soc/sof/Kconfig b/sound/soc/sof/Kconfig > index b204c65..9c280c9 100644 > --- a/sound/soc/sof/Kconfig > +++ b/sound/soc/sof/Kconfig > @@ -44,7 +44,7 @@ config SND_SOC_SOF_OPTIONS > if SND_SOC_SOF_OPTIONS > > config SND_SOC_SOF_NOCODEC > - tristate "SOF nocodec mode Support" > + bool "SOF nocodec mode Support" > help > This adds support for a dummy/nocodec machine driver fallback > option if no known codec is detected. This is typically only > -- > 2.7.4 > > >