perf: xgene: Include module.h
PATCH 1/1 perf: xgene: Include module.h
I ran into a build error when I disabled CONFIG_ACPI and tried to compile this driver:
drivers/perf/xgene_pmu.c:1242:1: warning: data definition has no type or storage class
MODULE_DEVICE_TABLE(of, xgene_pmu_of_match);
^drivers/perf/xgene_pmu.c:1242:1: error: type defaults to 'int' in declaration of 'MODULE_DEVICE_TABLE' [-Werror=implicit-int]
Include module.h for the MODULE_DEVICE_TABLE macro that's implicitly included through ACPI.
--- drivers/perf/xgene_pmu.c | 1 + 1 file changed, 1 insertion(+)
drivers/perf/xgene_pmu.c +1 -0
@@ -20,6 +20,7 @@*/ #include <linux/acpi.h> +#include <linux/module.h> #include <linux/clk.h> #include <linux/cpumask.h> #include <linux/interrupt.h>
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Hi Stephen,
Quoted 2 lines · Stephen Boyd
I ran into a build error when I disabled
CONFIG_ACPIand tried to compile this driver:
I tried kernel 4.9 and couldn't reproduce the issue. What is the kernel version you are seeing the compilation issue?
Regards
Tai
Quoted 31 lines
drivers/perf/xgene_pmu.c:1242:1: warning: data definition has no type or storage class
MODULE_DEVICE_TABLE(of, xgene_pmu_of_match);
^drivers/perf/xgene_pmu.c:1242:1: error: type defaults to 'int' in declaration of 'MODULE_DEVICE_TABLE' [-Werror=implicit-int]Include
module.hfor theMODULE_DEVICE_TABLEmacro that's implicitly included through ACPI.Cc Tai Nguyen <[email protected]>Signed-off-by Stephen Boyd <[email protected]>--- drivers/perf/xgene_pmu.c | 1 + 1 file changed, 1 insertion(+)drivers/perf/xgene_pmu.c +1
-1@@ -20,6 +20,7 @@*/ #include <linux/acpi.h> +#include <linux/module.h> #include <linux/clk.h> #include <linux/cpumask.h> #include <linux/interrupt.h> --The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Signature · 1 line
Tai
My bad, I can reproduce the issue now.
Thanks
Tai
Quoted 48 lines · Tai Tri Nguyen
Hi Stephen,
Quoted 2 lines · Stephen Boyd
I ran into a build error when I disabled
CONFIG_ACPIand tried to compile this driver:I tried kernel 4.9 and couldn't reproduce the issue. What is the kernel version you are seeing the compilation issue?
Regards
TaiQuoted 28 lines
drivers/perf/xgene_pmu.c:1242:1: warning: data definition has no type or storage class
MODULE_DEVICE_TABLE(of, xgene_pmu_of_match);
^drivers/perf/xgene_pmu.c:1242:1: error: type defaults to 'int' in declaration of 'MODULE_DEVICE_TABLE' [-Werror=implicit-int]Include
module.hfor theMODULE_DEVICE_TABLEmacro that's implicitly included through ACPI.Cc Tai Nguyen <[email protected]>Signed-off-by Stephen Boyd <[email protected]>--- drivers/perf/xgene_pmu.c | 1 + 1 file changed, 1 insertion(+)drivers/perf/xgene_pmu.c +1
-1@@ -20,6 +20,7 @@*/ #include <linux/acpi.h> +#include <linux/module.h> #include <linux/clk.h> #include <linux/cpumask.h> #include <linux/interrupt.h> --Quoted 3 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
--
Tai
Signature · 1 line
Tai
Hi Stephen,
Quoted 22 lines · Stephen Boyd
I ran into a build error when I disabled
CONFIG_ACPIand tried to compile this driver:
drivers/perf/xgene_pmu.c:1242:1: warning: data definition has no type or storage class
MODULE_DEVICE_TABLE(of, xgene_pmu_of_match);
^drivers/perf/xgene_pmu.c:1242:1: error: type defaults to 'int' in declaration of 'MODULE_DEVICE_TABLE' [-Werror=implicit-int]Include
module.hfor theMODULE_DEVICE_TABLEmacro that's implicitly included through ACPI.Cc Tai Nguyen <[email protected]>Signed-off-by Stephen Boyd <[email protected]>--- drivers/perf/xgene_pmu.c | 1 + 1 file changed, 1 insertion(+)drivers/perf/xgene_pmu.c +0
-0
drivers/perf/xgene_pmu.c line 23
Quoted 4 lines
drivers/perf/xgene_pmu.c +1
-0@@ -20,6 +20,7 @@*/ #include <linux/acpi.h> +#include <linux/module.h>
Please fix alphabetic order of the include file.
Quoted 7 lines
drivers/perf/xgene_pmu.c +0
-1#include <linux/clk.h> #include <linux/cpumask.h> #include <linux/interrupt.h> --The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Signature · 1 line
Tai
Quoted 25 lines · Tai Tri Nguyen
Quoted 24 lines · Stephen Boyd
I ran into a build error when I disabled
CONFIG_ACPIand tried to compile this driver:
drivers/perf/xgene_pmu.c:1242:1: warning: data definition has no type or storage class
MODULE_DEVICE_TABLE(of, xgene_pmu_of_match);
^drivers/perf/xgene_pmu.c:1242:1: error: type defaults to 'int' in declaration of 'MODULE_DEVICE_TABLE' [-Werror=implicit-int]Include
module.hfor theMODULE_DEVICE_TABLEmacro that's implicitly included through ACPI.Cc Tai Nguyen <[email protected]>Signed-off-by Stephen Boyd <[email protected]>--- drivers/perf/xgene_pmu.c | 1 + 1 file changed, 1 insertion(+)drivers/perf/xgene_pmu.c +0
-0@@ -20,6 +20,7 @@*/
Quoted 6 lines
drivers/perf/xgene_pmu.c line 23
Quoted 2 lines
drivers/perf/xgene_pmu.c +1
-0#include <linux/acpi.h> +#include <linux/module.h> Please fix alphabetic order of the include file.
Tested-by Tai Nguyen <[email protected]>
I've picked this up with the includes put in the correct order.
Thanks,
Will