[PATCH OLK-6.6] mm: fix compilation error due to MAX_PAGE_ORDER isn't declared
 
            hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/ID4AGC -------------------------------- When CONFIG_COMPACTION and CONFIG_CMA aren't defined, MAX_PAGE_ORDER isn't defined, but it is still used. To fit it, move MAX_PAGE_ORDER definition out of #ifdef. Fixes: af879363ce88 ("mm/compaction: introduce NR_PAGE_ORDERS and MAX_PAGE_ORDER") Signed-off-by: Jinjiang Tu <tujinjiang@huawei.com> --- include/linux/mmzone.h | 2 ++ mm/internal.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index afc35b8cb44e..b831463c2e6e 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -33,6 +33,8 @@ #endif #define MAX_ORDER_NR_PAGES (1 << MAX_ORDER) +#define MAX_PAGE_ORDER MAX_ORDER + #define IS_MAX_ORDER_ALIGNED(pfn) IS_ALIGNED(pfn, MAX_ORDER_NR_PAGES) #define NR_PAGE_ORDERS (MAX_ORDER + 1) diff --git a/mm/internal.h b/mm/internal.h index 3a127c3e2325..71e6f523175d 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -716,8 +716,6 @@ void memmap_init_range(unsigned long, int, unsigned long, unsigned long, #if defined CONFIG_COMPACTION || defined CONFIG_CMA -#define MAX_PAGE_ORDER MAX_ORDER - /* * in mm/compaction.c */ -- 2.43.0
 
            反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/18705 邮件列表地址:https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/TG6... FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/18705 Mailing list address: https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/TG6...
participants (2)
- 
                 Jinjiang Tu Jinjiang Tu
- 
                 patchwork bot patchwork bot