Re: [linux-next:master 11904/12006] include/linux/hugetlb.h:1240:33: error: 'VM_MAYSHARE' undeclared

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 30, 2022 at 05:01:00PM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   700e0cd3a5ce6a2cb90d9a2aab729b52f092a7d6
> commit: 98438ed47d60a6d30d5d2ad9c8786a0b92ca23f2 [11904/12006] mm/hugetlb: introduce hugetlb_walk()
> config: s390-randconfig-r031-20221128
> compiler: s390-linux-gcc (GCC) 12.1.0
> reproduce (this is a W=1 build):
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=98438ed47d60a6d30d5d2ad9c8786a0b92ca23f2
>         git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
>         git fetch --no-tags linux-next master
>         git checkout 98438ed47d60a6d30d5d2ad9c8786a0b92ca23f2
>         # save the config file
>         mkdir build_dir && cp config build_dir/.config
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=s390 SHELL=/bin/bash arch/s390/mm/
> 
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@xxxxxxxxx>
> 
> All errors (new ones prefixed by >>):
> 
>    In file included from arch/s390/mm/pageattr.c:6:
>    include/linux/hugetlb.h: In function '__vma_shareable_flags_pmd':
> >> include/linux/hugetlb.h:1240:33: error: 'VM_MAYSHARE' undeclared (first use in this function)
>     1240 |         return vma->vm_flags & (VM_MAYSHARE | VM_SHARED) &&
>          |                                 ^~~~~~~~~~~
>    include/linux/hugetlb.h:1240:33: note: each undeclared identifier is reported only once for each function it appears in
> >> include/linux/hugetlb.h:1240:47: error: 'VM_SHARED' undeclared (first use in this function); did you mean 'MNT_SHARED'?
>     1240 |         return vma->vm_flags & (VM_MAYSHARE | VM_SHARED) &&
>          |                                               ^~~~~~~~~
>          |                                               MNT_SHARED
> 
> 
> vim +/VM_MAYSHARE +1240 include/linux/hugetlb.h
> 
>   1236	
>   1237	static inline bool
>   1238	__vma_shareable_flags_pmd(struct vm_area_struct *vma)
>   1239	{
> > 1240		return vma->vm_flags & (VM_MAYSHARE | VM_SHARED) &&
>   1241			vma->vm_private_data;
>   1242	}
>   1243	

We can use some ifdef machineries too I think, but not as solid (and clean)
as just include mm.h in hugetlb.h..

Fix attached, to be squashed into "mm/hugetlb: Introduce hugetlb_walk()"
too (along with the other fixup to the same patch).

Thanks,

-- 
Peter Xu
>From 0064540dd67aea788ec5dac2d87bdb83262b941a Mon Sep 17 00:00:00 2001
From: Peter Xu <peterx@xxxxxxxxxx>
Date: Wed, 30 Nov 2022 10:45:21 -0500
Subject: [PATCH] fixup! mm/hugetlb: Introduce hugetlb_walk()
Content-type: text/plain

Signed-off-by: Peter Xu <peterx@xxxxxxxxxx>
---
 include/linux/hugetlb.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index ec2a1f93b12d..1c20cbbf3d22 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -2,6 +2,7 @@
 #ifndef _LINUX_HUGETLB_H
 #define _LINUX_HUGETLB_H
 
+#include <linux/mm.h>
 #include <linux/mm_types.h>
 #include <linux/mmdebug.h>
 #include <linux/fs.h>
-- 
2.37.3


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux