Skip to contentSkip to conversation

slimbus: ngd: QCOM_QMI_HELPERS has to be selected

PATCH In review Srinivas Kandagatla 3 participants 6 messages Oct 3, 2018 – Nov 7, 2018 Serial low-power inter-chip media bus (SLIMbus)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 slimbus: ngd: QCOM_QMI_HELPERS has to be selected

From: Niklas Cassel <[email protected]>

QCOM_QMI_HELPERS is a hidden kconfig, so the proper usage is to select it, not depend upon it.

---
 drivers/slimbus/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/slimbus/Kconfig +1 -1
index 9d73ad806698..9cca2c3559f2 100644
@@ -22,8 +22,8 @@ config SLIM_QCOM_CTRL
 
 config SLIM_QCOM_NGD_CTRL
 	tristate "Qualcomm SLIMbus Satellite Non-Generic Device Component"
-	depends on QCOM_QMI_HELPERS
 	depends on HAS_IOMEM && DMA_ENGINE
+	select QCOM_QMI_HELPERS
 	help
 	  Select driver if Qualcomm's SLIMbus Satellite Non-Generic Device
 	  Component is programmed using Linux kernel.
Signature · 1 line
2.19.0
#1 lore raw
Quoted 30 lines · Srinivas Kandagatla

From: Niklas Cassel <[email protected]>

QCOM_QMI_HELPERS is a hidden kconfig, so the proper usage is to select it, not depend upon it.

---
 drivers/slimbus/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/slimbus/Kconfig +1 -1
index 9d73ad806698..9cca2c3559f2 100644
@@ -22,8 +22,8 @@ config SLIM_QCOM_CTRL
 
 config SLIM_QCOM_NGD_CTRL
 	tristate "Qualcomm SLIMbus Satellite Non-Generic Device Component"
-	depends on QCOM_QMI_HELPERS
 	depends on HAS_IOMEM && DMA_ENGINE
+	select QCOM_QMI_HELPERS
 	help
 	  Select driver if Qualcomm's SLIMbus Satellite Non-Generic Device
 	  Component is programmed using Linux kernel.
Signature · 1 line
2.19.0

This adds the following build warning when applied:

WARNING: unmet direct dependencies detected for QCOM_QMI_HELPERS
Depends on [n]: ARCH_QCOM && NET [=y]
Selected by [m]:
- SLIM_QCOM_NGD_CTRL [=m] && SLIMBUS [=m] && HAS_IOMEM [=y] && DMA_ENGINE [=y]

#2 lore raw

PATCH v2 1/1 slimbus: ngd: QCOM_QMI_HELPERS has to be selected

QCOM_QMI_HELPERS is a hidden kconfig, so the proper usage is to select it, not depend upon it.

Because of this change, we now also need to depend on the same Kconfigs as QCOM_QMI_HELPERS depends on.

---
Hello Greg, Srini,

I'm sorry for this.
(Although I'm a bit curious why 0-day test bot didn't catch this.)

Considering that I've just changed QCOM_QMI_HELPERS in:
ccfb464cd106 ("soc: qcom: Allow COMPILE_TEST of qcom SoC Kconfigs") which is currently in linux-next, and that this Kconfig should depend on the same Kconfigs as QCOM_QMI_HELPERS depends on, I chose to have this Kconfig match the QCOM_QMI_HELPERS that is currently in linux-next.

 drivers/slimbus/Kconfig | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/slimbus/Kconfig +3 -2
index 9d73ad806698..8cd595148d17 100644
@@ -22,8 +22,9 @@ config SLIM_QCOM_CTRL
 
 config SLIM_QCOM_NGD_CTRL
 	tristate "Qualcomm SLIMbus Satellite Non-Generic Device Component"
-	depends on QCOM_QMI_HELPERS
-	depends on HAS_IOMEM && DMA_ENGINE
+	depends on HAS_IOMEM && DMA_ENGINE && NET
+	depends on ARCH_QCOM || COMPILE_TEST
+	select QCOM_QMI_HELPERS
 	help
 	  Select driver if Qualcomm's SLIMbus Satellite Non-Generic Device
 	  Component is programmed using Linux kernel.
Signature · 1 line
2.17.2
author Acked-by on v2 1/1
#3 lore raw

Thanks Niklas for quick v2 patch!

Quoted 7 lines · Niklas Cassel

QCOM_QMI_HELPERS is a hidden kconfig, so the proper usage is to select it, not depend upon it.

Because of this change, we now also need to depend on the same Kconfigs as QCOM_QMI_HELPERS depends on.

LGTM

Quoted 33 lines

---
Hello Greg, Srini,

I'm sorry for this.
(Although I'm a bit curious why 0-day test bot didn't catch this.)

Considering that I've just changed QCOM_QMI_HELPERS in:
ccfb464cd106 ("soc: qcom: Allow COMPILE_TEST of qcom SoC Kconfigs") which is currently in linux-next, and that this Kconfig should depend on the same Kconfigs as QCOM_QMI_HELPERS depends on, I chose to have this Kconfig match the QCOM_QMI_HELPERS that is currently in linux-next.

  drivers/slimbus/Kconfig | 5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)
drivers/slimbus/Kconfig +3 -2
index 9d73ad806698..8cd595148d17 100644
@@ -22,8 +22,9 @@ config SLIM_QCOM_CTRL
 
  config SLIM_QCOM_NGD_CTRL
  	tristate "Qualcomm SLIMbus Satellite Non-Generic Device Component"
-	depends on QCOM_QMI_HELPERS
-	depends on HAS_IOMEM && DMA_ENGINE
+	depends on HAS_IOMEM && DMA_ENGINE && NET
+	depends on ARCH_QCOM || COMPILE_TEST
+	select QCOM_QMI_HELPERS
  	help
  	  Select driver if Qualcomm's SLIMbus Satellite Non-Generic Device
  	  Component is programmed using Linux kernel.
#4 lore raw
In reply to Niklas Cassel
Quoted 14 lines · Niklas Cassel

QCOM_QMI_HELPERS is a hidden kconfig, so the proper usage is to select it, not depend upon it.

Because of this change, we now also need to depend on the same Kconfigs as QCOM_QMI_HELPERS depends on.

---
Hello Greg, Srini,

I'm sorry for this.
(Although I'm a bit curious why 0-day test bot didn't catch this.)

Quoted 6 lines

Considering that I've just changed QCOM_QMI_HELPERS in:
ccfb464cd106 ("soc: qcom: Allow COMPILE_TEST of qcom SoC Kconfigs") which is currently in linux-next, and that this Kconfig should depend on the same Kconfigs as QCOM_QMI_HELPERS depends on, I chose to have this Kconfig match the QCOM_QMI_HELPERS that is currently in linux-next.

Really? I do this and then I get this build error on x86:

drivers/slimbus/qcom-ngd-ctrl.c: In function ‘of_qcom_slim_ngd_register’:
drivers/slimbus/qcom-ngd-ctrl.c:1333:63: warning: dereferencing ‘void *’ pointer

  data = of_match_node(qcom_slim_ngd_dt_match, parent->of_node)->data;
                                                               ^~

drivers/slimbus/qcom-ngd-ctrl.c:1333:63: error: request for member ‘data’ in something not a structure or union

So I can't take this, something else must be wrong here...

thanks,

greg k-h

#5 lore raw
Quoted 10 lines · Greg KH

Really? I do this and then I get this build error on x86:

drivers/slimbus/qcom-ngd-ctrl.c: In function ‘of_qcom_slim_ngd_register’:
drivers/slimbus/qcom-ngd-ctrl.c:1333:63: warning: dereferencing ‘void *’ pointer

   data = of_match_node(qcom_slim_ngd_dt_match, parent->of_node)->data;
                                                                ^~

drivers/slimbus/qcom-ngd-ctrl.c:1333:63: error: request for member ‘data’ in something not a structure or union

So I can't take this, something else must be wrong here...

That is fine!
Yes, there seems to be one more issue here, on non DT platforms of_match_node is set to be NULL, which is why we are seeing this error I guess!

I will fix this up, do some test and send both the fixes together.

thanks,
srini