提交 363c0c87 编写于 作者: Z Zhang Jian 提交者: Zheng Zengkai

mm: init: Fix build waring for ascend enable features

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: NZhang Jian <zhangjian210@huawei.com>
Reviewed-by: Nchenweilong <chenweilong@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 24403cff
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册