All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vinod Koul <vkoul@kernel.org>
To: Randy Dunlap <rdunlap@infradead.org>,
	Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: kernel test robot <lkp@intel.com>,
	Jonathan Marek <jonathan@marek.ca>,
	kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Bard Liao <yung-chuan.liao@linux.intel.com>,
	moderated for non-subscribers <alsa-devel@alsa-project.org>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Subject: Re: drivers/soundwire/qcom.c:767: undefined reference to `slimbus_bus'
Date: Wed, 25 Nov 2020 11:21:55 +0530	[thread overview]
Message-ID: <20201125055155.GD8403@vkoul-mobl> (raw)
In-Reply-To: <e0d74391-18ae-0493-b8a1-cbeb6f00bde8@infradead.org>

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 <vkoul@kernel.org>
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 <lkp@intel.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
---
 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

WARNING: multiple messages have this Message-ID (diff)
From: Vinod Koul <vkoul@kernel.org>
To: Randy Dunlap <rdunlap@infradead.org>,
	Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	moderated for non-subscribers <alsa-devel@alsa-project.org>,
	kbuild-all@lists.01.org, kernel test robot <lkp@intel.com>,
	Jonathan Marek <jonathan@marek.ca>,
	linux-kernel@vger.kernel.org,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Bard Liao <yung-chuan.liao@linux.intel.com>
Subject: Re: drivers/soundwire/qcom.c:767: undefined reference to `slimbus_bus'
Date: Wed, 25 Nov 2020 11:21:55 +0530	[thread overview]
Message-ID: <20201125055155.GD8403@vkoul-mobl> (raw)
In-Reply-To: <e0d74391-18ae-0493-b8a1-cbeb6f00bde8@infradead.org>

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 <vkoul@kernel.org>
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 <lkp@intel.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
---
 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

WARNING: multiple messages have this Message-ID (diff)
From: Vinod Koul <vkoul@kernel.org>
To: kbuild-all@lists.01.org
Subject: Re: drivers/soundwire/qcom.c:767: undefined reference to `slimbus_bus'
Date: Wed, 25 Nov 2020 11:21:55 +0530	[thread overview]
Message-ID: <20201125055155.GD8403@vkoul-mobl> (raw)
In-Reply-To: <e0d74391-18ae-0493-b8a1-cbeb6f00bde8@infradead.org>

[-- Attachment #1: Type: text/plain, Size: 2928 bytes --]

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 <vkoul@kernel.org>
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 <lkp@intel.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
---
 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

  reply	other threads:[~2020-11-25  5:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-02 19:47 drivers/soundwire/qcom.c:767: undefined reference to `slimbus_bus' kernel test robot
2020-11-02 19:47 ` kernel test robot
2020-11-05  3:32 ` Randy Dunlap
2020-11-05  3:32   ` Randy Dunlap
2020-11-05  3:32   ` Randy Dunlap
2020-11-25  5:51   ` Vinod Koul [this message]
2020-11-25  5:51     ` Vinod Koul
2020-11-25  5:51     ` Vinod Koul
2020-11-25 11:41     ` Srinivas Kandagatla
2020-11-25 11:41       ` Srinivas Kandagatla
2020-11-25 11:41       ` Srinivas Kandagatla
2020-11-25 17:31     ` Randy Dunlap
2020-11-25 17:31       ` Randy Dunlap
2020-11-25 17:31       ` Randy Dunlap
2020-11-26  4:26       ` Vinod Koul
2020-11-26  4:26         ` Vinod Koul
2020-11-26  4:26         ` Vinod Koul

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=20201125055155.GD8403@vkoul-mobl \
    --to=vkoul@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=jonathan@marek.ca \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=rdunlap@infradead.org \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=yung-chuan.liao@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.