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=-14.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 6B72BC5519F for ; Wed, 25 Nov 2020 05:53:05 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A12F8208C3 for ; Wed, 25 Nov 2020 05:53:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="Ifbk2xwn"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="ozmQ4UeK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A12F8208C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id A4FE01717; Wed, 25 Nov 2020 06:52:11 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A4FE01717 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1606283581; bh=3TsnI28YOrBSLpojTzDR4uEaUM9Fo2k4e+hHZUS++hE=; h=Date:From:To:Subject:References:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Ifbk2xwnjIXB0DZ1rD6eh13AQIQreZfunCAdTDZNBlwvRkQuegVnnhZ9OA8P2oXhk G9AnnmQenFKo4yEqeW/IT0IW5O5F9NynprvNmdH7C1RM5ezHtIYOYcklU2otYd/XHb eA45xkfxlG0H9TgiByL3qwWLItQhjJOhO8pF+dn8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 0647DF8015F; Wed, 25 Nov 2020 06:52:10 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 371BFF8019D; Wed, 25 Nov 2020 06:52:09 +0100 (CET) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id DE14EF8015A for ; Wed, 25 Nov 2020 06:52:02 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz DE14EF8015A Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="ozmQ4UeK" Received: from localhost (unknown [122.179.120.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8D646208C3; Wed, 25 Nov 2020 05:51:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606283519; bh=3TsnI28YOrBSLpojTzDR4uEaUM9Fo2k4e+hHZUS++hE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ozmQ4UeKydkeEsVKXsDHXAXgDLyMhdyo9hbJSW57EA4T2JFAxGgfIfHSc0AO9+0nv HN7EfuvDo1Swl83LcA+xeGveMXmbBpo5SfotKOoB3RsgXdmG8pRYaBHsfo9ncof989 X5WxCc2e3ci6W+SjH0Ilc1bHmTjIk7ACFPTIDdfM= Date: Wed, 25 Nov 2020 11:21:55 +0530 From: Vinod Koul To: Randy Dunlap , Srinivas Kandagatla Subject: Re: drivers/soundwire/qcom.c:767: undefined reference to `slimbus_bus' Message-ID: <20201125055155.GD8403@vkoul-mobl> References: <202011030351.iq9CBMO3-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: Pierre-Louis Bossart , moderated for non-subscribers , kbuild-all@lists.01.org, kernel test robot , Jonathan Marek , linux-kernel@vger.kernel.org, Bjorn Andersson , Bard Liao X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Hi Randy, On 04-11-20, 19:32, Randy Dunlap wrote: > On 11/2/20 11:47 AM, kernel test robot wrote: > > All errors (new ones prefixed by >>): > > > > or1k-linux-ld: drivers/soundwire/qcom.o: in function `qcom_swrm_probe': > >>> drivers/soundwire/qcom.c:767: undefined reference to `slimbus_bus' > >>> or1k-linux-ld: drivers/soundwire/qcom.c:771: undefined reference to `slimbus_bus' > > > > 09309093d5e8f87 Jonathan Marek 2020-09-08 770 #if IS_ENABLED(CONFIG_SLIMBUS) > > 02efb49aa805cee Srinivas Kandagatla 2020-01-13 @771 if (dev->parent->bus == &slimbus_bus) { > > 5bd773242f75da3 Jonathan Marek 2020-09-05 772 #else > > 5bd773242f75da3 Jonathan Marek 2020-09-05 773 if (false) { > > 5bd773242f75da3 Jonathan Marek 2020-09-05 774 #endif > > config SOUNDWIRE_QCOM > tristate "Qualcomm SoundWire Master driver" > imply SLIMBUS > depends on SND_SOC > > The kernel config that was attached has: > CONFIG_SOUNDWIRE_QCOM=y > CONFIG_SLIMBUS=m > > I expected that "imply" would make SLIMBUS=y since SOUNDWIRE_QCOM=y, > but I guess that's not the case. :( > > Any ideas about what to do here? Sorry to have missed this earlier. I did some digging and found the Kconfig code to be correct, but not the driver code. Per the Documentation if we are using imply we should use IS_REACHABLE() rather than IS_ENABLED. This seems to take care of build failure for me on arm64 and x64 builds. Can you confirm with below patch: ---><8--- From: Vinod Koul Date: Wed, 25 Nov 2020 11:15:22 +0530 Subject: [PATCH] soundwire: qcom: Fix build failure when slimbus is module Commit 5bd773242f75 ("soundwire: qcom: avoid dependency on CONFIG_SLIMBUS") removed hard dependency on Slimbus for qcom driver but it results in build failure when: CONFIG_SOUNDWIRE_QCOM=y CONFIG_SLIMBUS=m drivers/soundwire/qcom.o: In function `qcom_swrm_probe': qcom.c:(.text+0xf44): undefined reference to `slimbus_bus' Fix this by using IS_REACHABLE() in driver which is recommended to be sued with imply. Fixes: 5bd773242f75 ("soundwire: qcom: avoid dependency on CONFIG_SLIMBUS") Reported-by: kernel test robot Signed-off-by: Vinod Koul --- drivers/soundwire/qcom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c index fbca4ebf63e9..6d22df01f354 100644 --- a/drivers/soundwire/qcom.c +++ b/drivers/soundwire/qcom.c @@ -799,7 +799,7 @@ static int qcom_swrm_probe(struct platform_device *pdev) data = of_device_get_match_data(dev); ctrl->rows_index = sdw_find_row_index(data->default_rows); ctrl->cols_index = sdw_find_col_index(data->default_cols); -#if IS_ENABLED(CONFIG_SLIMBUS) +#if IS_REACHABLE(CONFIG_SLIMBUS) if (dev->parent->bus == &slimbus_bus) { #else if (false) { -- 2.26.2 -- ~Vinod