Skip to contentSkip to conversation

drivers/hwtracing: fix coresight-replicator-qcom implicit <module.h> usage

PATCH In review Paul Gortmaker 2 participants 2 messages Jun 3, 2015 – Jun 4, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/hwtracing: fix coresight-replicator-qcom implicit <module.h> usage

In commit 620cf787c121f39b5223e43bad3d1b7c66ecead5 ("coresight: replicator:
Add Qualcomm CoreSight Replicator driver") this driver was added.

It uses module_amba_driver(replicator_driver) to register itself with the system -- which is just an alias for module_driver. This currently works by relying on getting that via init.h but we are planning to move that code[1] to module.h -- at which time this will fail to compile since it does not include module.h currently, resulting in:

drivers/hwtracing/coresight/coresight-replicator-qcom.c:214:1: error: type defaults to 'int' in declaration of 'module_init' [-Werror=implicit-int] drivers/hwtracing/coresight/coresight-replicator-qcom.c:214:1: error: type defaults to 'int' in declaration of 'module_exit' [-Werror=implicit-int]

In the future, the amba support may want to create another alias that uses builtin_driver[2] for cases like this which are using bool Kconfig triggers, but for now we just fix the implicit include.

[1] https://lkml.kernel.org/r/1433276168-21550-1-git-send-email-paul.gortmaker at windriver.com
[2] https://lkml.kernel.org/r/1431287385-1526-1-git-send-email-paul.gortmaker at windriver.com

Cc Pratik Patel <[email protected]>
Cc Ivan T. Ivanov <[email protected]>
Cc Mathieu Poirier <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>

---

[Note: Commit 620cf787c121 is only in linux-next trees via staging-next;
this fixes a next build fail when staging-next is merged with [1] above.]

 drivers/hwtracing/coresight/coresight-replicator-qcom.c | 1 +
 1 file changed, 1 insertion(+)
drivers/hwtracing/coresight/coresight-replicator-qcom.c +1 -0
index deacea49af36..584059e9e866 100644
@@ -15,6 +15,7 @@
 #include <linux/clk.h>
 #include <linux/coresight.h>
 #include <linux/device.h>
+#include <linux/module.h>
 #include <linux/err.h>
 #include <linux/init.h>
 #include <linux/io.h>
Signature · 1 line
2.2.1
Acked-by on v1 1/1
#1 lore raw
Quoted 45 lines · Paul Gortmaker

In commit 620cf787c121f39b5223e43bad3d1b7c66ecead5 ("coresight: replicator:
Add Qualcomm CoreSight Replicator driver") this driver was added.

It uses module_amba_driver(replicator_driver) to register itself with the system -- which is just an alias for module_driver. This currently works by relying on getting that via init.h but we are planning to move that code[1] to module.h -- at which time this will fail to compile since it does not include module.h currently, resulting in:

drivers/hwtracing/coresight/coresight-replicator-qcom.c:214:1: error: type defaults to 'int' in declaration of 'module_init' [-Werror=implicit-int] drivers/hwtracing/coresight/coresight-replicator-qcom.c:214:1: error: type defaults to 'int' in declaration of 'module_exit' [-Werror=implicit-int]

In the future, the amba support may want to create another alias that uses builtin_driver[2] for cases like this which are using bool Kconfig triggers, but for now we just fix the implicit include.

[1] https://lkml.kernel.org/r/1433276168-21550-1-git-send-email-paul.gortmaker at windriver.com
[2] https://lkml.kernel.org/r/1431287385-1526-1-git-send-email-paul.gortmaker at windriver.com

Cc Pratik Patel <[email protected]>
Cc Ivan T. Ivanov <[email protected]>
Cc Mathieu Poirier <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>

---

[Note: Commit 620cf787c121 is only in linux-next trees via staging-next;
this fixes a next build fail when staging-next is merged with [1] above.]

 drivers/hwtracing/coresight/coresight-replicator-qcom.c | 1 +
 1 file changed, 1 insertion(+)
drivers/hwtracing/coresight/coresight-replicator-qcom.c +1 -1
index deacea49af36..584059e9e866 100644
@@ -15,6 +15,7 @@
 #include <linux/clk.h>
 #include <linux/coresight.h>
 #include <linux/device.h>
+#include <linux/module.h>
 #include <linux/err.h>
 #include <linux/init.h>
 #include <linux/io.h>
--
Quoted 2 lines

2.2.1