From f6163ee1b332614ed5de8adcdd36f242026582a1 Mon Sep 17 00:00:00 2001 From: Ding Tianhong Date: Sat, 30 Oct 2021 11:09:23 +0800 Subject: [PATCH] ascend: sharepool: fix compile warning when the sharepool is turned off MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ascend inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4EUVI CVE: NA ------------------------------------------------- The is_vmalloc_sharepool agrument is defined of different type when the sharepool is turned off, it will occur the warning like this: /include/linux/share_pool.h:462:20: note: expected ‘struct vm_struct *’ but argument is of type ‘long unsigned int’ Fix this warning. Fixes: ad4504322d9e ("ascend: sharepool: don't enable the vmalloc to use hugepage default") Signed-off-by: Ding Tianhong Reviewed-by: Tang Yizhou Signed-off-by: Yang Yingliang Reviewed-by: Weilong Chen Signed-off-by: Yang Yingliang --- include/linux/share_pool.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/share_pool.h b/include/linux/share_pool.h index d94d48f57798..859efd3525f3 100644 --- a/include/linux/share_pool.h +++ b/include/linux/share_pool.h @@ -466,12 +466,12 @@ static inline void *buff_vzalloc_hugepage_user(unsigned long size) return NULL; } -static inline bool is_vmalloc_huge(struct vm_struct *vm) +static inline bool is_vmalloc_huge(unsigned long vm_flags) { return NULL; } -static inline bool is_vmalloc_sharepool(struct vm_struct *vm) +static inline bool is_vmalloc_sharepool(unsigned long vm_flags) { return NULL; } -- GitLab