Skip to contentSkip to conversation

Bluetooth: btqcomsmd: fix compile-test dependency

PATCH RESEND In review Arnd Bergmann 2 participants 3 messages Mar 13, 2017 – Mar 20, 2017 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 Bluetooth: btqcomsmd: fix compile-test dependency

compile-testing fails when QCOM_SMD is a loadable module:

drivers/bluetooth/built-in.o: In function `btqcomsmd_send':
btqca.c:(.text+0xa8): undefined reference to qcom_smd_send' drivers/bluetooth/built-in.o: In function btqcomsmd_probe':
btqca.c:(.text+0x3ec): undefined reference to qcom_wcnss_open_channel' btqca.c:(.text+0x46c): undefined reference to qcom_smd_set_drvdata'

This clarifies the dependency to allow compile-testing only when SMD is completely disabled, otherwise the dependency on QCOM_SMD will make sure we can link against it.

Fixes e27ee2b16bad ("Bluetooth: btqcomsmd: Allow driver to build if COMPILE_TEST is enabled")

---
Sent on March 1 2017 originally, still needed for v4.11-rc2

---
 drivers/bluetooth/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bluetooth/Kconfig +1 -1
index c2c14a12713b..2ef2b240b31b 100644
@@ -344,7 +344,7 @@ config BT_WILINK
 
 config BT_QCOMSMD
 	tristate "Qualcomm SMD based HCI support"
-	depends on (QCOM_SMD && QCOM_WCNSS_CTRL) || COMPILE_TEST
+	depends on (QCOM_SMD && QCOM_WCNSS_CTRL) || (COMPILE_TEST && QCOM_SMD=n)
 	select BT_QCA
 	help
 	  Qualcomm SMD based HCI driver.
Signature · 1 line
2.9.0
#1 lore raw
Quoted 8 lines · Arnd Bergmann

compile-testing fails when QCOM_SMD is a loadable module:

drivers/bluetooth/built-in.o: In function `btqcomsmd_send':
btqca.c:(.text+0xa8): undefined reference to qcom_smd_send' drivers/bluetooth/built-in.o: In function btqcomsmd_probe':
btqca.c:(.text+0x3ec): undefined reference to qcom_wcnss_open_channel' btqca.c:(.text+0x46c): undefined reference to qcom_smd_set_drvdata'

Quoted 7 lines

This clarifies the dependency to allow compile-testing only when SMD is completely disabled, otherwise the dependency on QCOM_SMD will make sure we can link against it.

Fixes e27ee2b16bad ("Bluetooth: btqcomsmd: Allow driver to build if COMPILE_TEST is enabled")

Sorry for the slow response, wanted to make some test-builds before answering this.

It's valid to set:
COMPILE_TEST=y
QCOM_SMD=y
WCNSS_CTRL=m
BT_QCOMSMD=y

which will cause the qcom_wcnss_open_channel issue above to remain.

For the wcn36xx driver we cover both with:

	depends on QCOM_WCNSS_CTRL || QCOM_WCNSS_CTRL=n
	depends on QCOM_SMD || QCOM_SMD=n

The ath-maintainers didn't want COMPILE_TEST due to some unrelated reasons, but I think it's better to express it in two statements, i.e.

	depends on QCOM_WCNSS_CTRL || (COMPILE_TEST && QCOM_WCNSS_CTRL=n)
	depends on QCOM_SMD || (COMPILE_TEST && QCOM_SMD=n)

Regards,
Bjorn

Quoted 22 lines

---
Sent on March 1 2017 originally, still needed for v4.11-rc2

---
 drivers/bluetooth/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bluetooth/Kconfig +1 -1
index c2c14a12713b..2ef2b240b31b 100644
@@ -344,7 +344,7 @@ config BT_WILINK
 
 config BT_QCOMSMD
 	tristate "Qualcomm SMD based HCI support"
-	depends on (QCOM_SMD && QCOM_WCNSS_CTRL) || COMPILE_TEST
+	depends on (QCOM_SMD && QCOM_WCNSS_CTRL) || (COMPILE_TEST && QCOM_SMD=n)
 	select BT_QCA
 	help
 	  Qualcomm SMD based HCI driver.
Signature · 1 line
2.9.0
#2 lore raw
Quoted 30 lines · Bjorn Andersson
Quoted 8 lines · Arnd Bergmann

compile-testing fails when QCOM_SMD is a loadable module:

drivers/bluetooth/built-in.o: In function `btqcomsmd_send':
btqca.c:(.text+0xa8): undefined reference to qcom_smd_send' drivers/bluetooth/built-in.o: In function btqcomsmd_probe':
btqca.c:(.text+0x3ec): undefined reference to qcom_wcnss_open_channel' btqca.c:(.text+0x46c): undefined reference to qcom_smd_set_drvdata'

Quoted 7 lines

This clarifies the dependency to allow compile-testing only when SMD is completely disabled, otherwise the dependency on QCOM_SMD will make sure we can link against it.

Fixes e27ee2b16bad ("Bluetooth: btqcomsmd: Allow driver to build if COMPILE_TEST is enabled")

Sorry for the slow response, wanted to make some test-builds before answering this.

It's valid to set:
COMPILE_TEST=y
QCOM_SMD=y
WCNSS_CTRL=m
BT_QCOMSMD=y

which will cause the qcom_wcnss_open_channel issue above to remain.

For the wcn36xx driver we cover both with:

Quoted 8 lines
        depends on QCOM_WCNSS_CTRL || QCOM_WCNSS_CTRL=n
        depends on QCOM_SMD || QCOM_SMD=n

The ath-maintainers didn't want COMPILE_TEST due to some unrelated reasons, but I think it's better to express it in two statements, i.e.

        depends on QCOM_WCNSS_CTRL || (COMPILE_TEST && QCOM_WCNSS_CTRL=n)
        depends on QCOM_SMD || (COMPILE_TEST && QCOM_SMD=n)

Agreed, that looks cleaner. AFAICT the effect is the same as in my version, as QCOM_WCNSS_CTRL is a tristate symbol and also depends on QCOM_SMD (so QCOM_WCNSS_CTRL=y implies QCOM_SMD=y, and QCOM_WCNSS_CTRL=m implies QCOM_SMD=(y||m).

Can you send the updated patch?

Arnd