From: Zhang Jian zhangjian210@huawei.com
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I66EW4 CVE: NA
----------------------------------------------------
When enable Ascend enable CONFIG_ASCEND_FEATURES, and enable CONFIG_ASCEND_CHARGE_MIGRATE_HUGEPAGES, and build kernel image, it will have build warning as follows:
arch/arm64/mm/init.c:736:2: warning: ISO C90 fobids mixed declarations and code [-Wdeclaration-atfer-statement] 736 | extern int enable_charge_mighp;
Signed-off-by: Zhang Jian zhangjian210@huawei.com Reviewed-by: chenweilong 00534513 chenweilong@huawei.com Signed-off-by: Zheng Zengkai zhengzengkai@huawei.com --- arch/arm64/mm/init.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index 1b2f55d3c195..be67a9c42628 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c @@ -727,14 +727,20 @@ void dump_mem_limit(void) } }
+#ifdef CONFIG_ASCEND_CHARGE_MIGRATE_HUGEPAGES +extern int enable_charge_mighp; +#endif + +#ifdef CONFIG_ARM64_PSEUDO_NMI +extern bool enable_pseudo_nmi; +#endif + void ascend_enable_all_features(void) { if (IS_ENABLED(CONFIG_ASCEND_DVPP_MMAP)) enable_mmap_dvpp = 1;
#ifdef CONFIG_ASCEND_CHARGE_MIGRATE_HUGEPAGES - extern int enable_charge_mighp; - enable_charge_mighp = 1; #endif
@@ -743,8 +749,6 @@ void ascend_enable_all_features(void) #endif
#ifdef CONFIG_ARM64_PSEUDO_NMI - extern bool enable_pseudo_nmi; - enable_pseudo_nmi = true; #endif