Hi Peter,
FYI, the error/warning still remains.
tree:
https://android.googlesource.com/kernel/common android12-5.10
head: c8df669b7cf85238443a0df3e136a8dd0364e52d
commit: 59caf93f36aed4b7c5960672376b966e3f5b2bf1 [7509/9468] BACKPORT: FROMGIT: hugetlb:
pass vma into huge_pte_alloc() and huge_pmd_share()
config: arm-randconfig-s032-20210521 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce:
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
git remote add android-common
https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android12-5.10
git checkout 59caf93f36aed4b7c5960672376b966e3f5b2bf1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1
CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
mm/hugetlb.c:5458:8: error: conflicting types for 'huge_pmd_share'
5458 | pte_t *huge_pmd_share(struct mm_struct *mm, struct vm_area_struct vma,
| ^~~~~~~~~~~~~~
In file included from mm/hugetlb.c:39:
include/linux/hugetlb.h:155:8: note: previous declaration of 'huge_pmd_share'
was here
155 | pte_t *huge_pmd_share(struct mm_struct *mm, struct vm_area_struct *vma,
| ^~~~~~~~~~~~~~
mm/hugetlb.c: In function 'huge_pte_alloc':
> mm/hugetlb.c:5497:30: error: incompatible type for argument 2 of
'huge_pmd_share'
5497 | pte = huge_pmd_share(mm, vma, addr, pud);
| ^~~
| |
| struct vm_area_struct *
mm/hugetlb.c:5458:67: note: expected 'struct vm_area_struct' but argument is of
type 'struct vm_area_struct *'
5458 | pte_t *huge_pmd_share(struct mm_struct *mm, struct vm_area_struct vma,
| ~~~~~~~~~~~~~~~~~~~~~~^~~
vim +/huge_pmd_share +5497 mm/hugetlb.c
5476
5477 #ifdef CONFIG_ARCH_WANT_GENERAL_HUGETLB
5478 pte_t *huge_pte_alloc(struct mm_struct *mm, struct vm_area_struct *vma,
5479 unsigned long addr, unsigned long sz)
5480 {
5481 pgd_t *pgd;
5482 p4d_t *p4d;
5483 pud_t *pud;
5484 pte_t *pte = NULL;
5485
5486 pgd = pgd_offset(mm, addr);
5487 p4d = p4d_alloc(mm, pgd, addr);
5488 if (!p4d)
5489 return NULL;
5490 pud = pud_alloc(mm, p4d, addr);
5491 if (pud) {
5492 if (sz == PUD_SIZE) {
5493 pte = (pte_t *)pud;
5494 } else {
5495 BUG_ON(sz != PMD_SIZE);
5496 if (want_pmd_share() && pud_none(*pud))
5497 pte = huge_pmd_share(mm, vma, addr, pud);
5498 else
5499 pte = (pte_t *)pmd_alloc(mm, pud, addr);
5500 }
5501 }
5502 BUG_ON(pte && pte_present(*pte) && !pte_huge(*pte));
5503
5504 return pte;
5505 }
5506
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org