* [PATCH 0/2] slimbus: ngd: enable compile test
@ 2018-11-12 12:25 Srinivas Kandagatla
2018-11-12 12:25 ` [PATCH 1/2] slimbus: ngd: Fix build error on x86 Srinivas Kandagatla
2018-11-12 12:25 ` [PATCH 2/2] slimbus: ngd: QCOM_QMI_HELPERS has to be selected Srinivas Kandagatla
0 siblings, 2 replies; 3+ messages in thread
From: Srinivas Kandagatla @ 2018-11-12 12:25 UTC (permalink / raw)
To: gregkh; +Cc: niklas.cassel, linux-kernel, Srinivas Kandagatla
This patchset fixes few issues with Kconfig and make the driver able
to compile test on other archs.
First patch fixes x86 build error and second one enables the compile test.
Second one fixes Kconfigs and add compile test flag.
thanks,
srini
Niklas Cassel (1):
slimbus: ngd: QCOM_QMI_HELPERS has to be selected
Srinivas Kandagatla (1):
slimbus: ngd: Fix build error on x86
drivers/slimbus/Kconfig | 5 +++--
drivers/slimbus/qcom-ngd-ctrl.c | 5 +++--
2 files changed, 6 insertions(+), 4 deletions(-)
--
2.19.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] slimbus: ngd: Fix build error on x86
2018-11-12 12:25 [PATCH 0/2] slimbus: ngd: enable compile test Srinivas Kandagatla
@ 2018-11-12 12:25 ` Srinivas Kandagatla
2018-11-12 12:25 ` [PATCH 2/2] slimbus: ngd: QCOM_QMI_HELPERS has to be selected Srinivas Kandagatla
1 sibling, 0 replies; 3+ messages in thread
From: Srinivas Kandagatla @ 2018-11-12 12:25 UTC (permalink / raw)
To: gregkh; +Cc: niklas.cassel, linux-kernel, Srinivas Kandagatla
on non DT platforms like x86 of_match_node is set to NULL, dereferencing
directly would throw an error.
Fix this by doing this in two steps, get the match then the data.
Reported-by: Greg KH <gregkh@linuxfoundation.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
drivers/slimbus/qcom-ngd-ctrl.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c
index 7218fb963d0a..7de8907723a2 100644
--- a/drivers/slimbus/qcom-ngd-ctrl.c
+++ b/drivers/slimbus/qcom-ngd-ctrl.c
@@ -1330,11 +1330,12 @@ static int of_qcom_slim_ngd_register(struct device *parent,
{
const struct ngd_reg_offset_data *data;
struct qcom_slim_ngd *ngd;
+ const struct of_device_id *match;
struct device_node *node;
u32 id;
- data = of_match_node(qcom_slim_ngd_dt_match, parent->of_node)->data;
-
+ match = of_match_node(qcom_slim_ngd_dt_match, parent->of_node);
+ data = match->data;
for_each_available_child_of_node(parent->of_node, node) {
if (of_property_read_u32(node, "reg", &id))
continue;
--
2.19.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] slimbus: ngd: QCOM_QMI_HELPERS has to be selected
2018-11-12 12:25 [PATCH 0/2] slimbus: ngd: enable compile test Srinivas Kandagatla
2018-11-12 12:25 ` [PATCH 1/2] slimbus: ngd: Fix build error on x86 Srinivas Kandagatla
@ 2018-11-12 12:25 ` Srinivas Kandagatla
1 sibling, 0 replies; 3+ messages in thread
From: Srinivas Kandagatla @ 2018-11-12 12:25 UTC (permalink / raw)
To: gregkh; +Cc: niklas.cassel, linux-kernel, Srinivas Kandagatla
From: Niklas Cassel <niklas.cassel@linaro.org>
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.
Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
drivers/slimbus/Kconfig | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/slimbus/Kconfig b/drivers/slimbus/Kconfig
index 9d73ad806698..8cd595148d17 100644
--- a/drivers/slimbus/Kconfig
+++ b/drivers/slimbus/Kconfig
@@ -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.
--
2.19.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-11-12 12:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-12 12:25 [PATCH 0/2] slimbus: ngd: enable compile test Srinivas Kandagatla
2018-11-12 12:25 ` [PATCH 1/2] slimbus: ngd: Fix build error on x86 Srinivas Kandagatla
2018-11-12 12:25 ` [PATCH 2/2] slimbus: ngd: QCOM_QMI_HELPERS has to be selected Srinivas Kandagatla
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.