[ammarfaizi2-block:next/linux-next/master 127/370] arch/xtensa/mm/init.c:220:10: error: redefinition of 'vm_get_page_prot'

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

 



tree:   https://github.com/ammarfaizi2/linux-block next/linux-next/master
head:   06aeb1495c39c86ccfaf1adadc1d2200179f16eb
commit: 1e2bfe0a0db508e2169bf8d45a8331d430c3a58c [127/370] extensa/mm: enable ARCH_HAS_VM_GET_PAGE_PROT
config: xtensa-nommu_kc705_defconfig (https://download.01.org/0day-ci/archive/20220226/202202261831.AGgPQFZ9-lkp@xxxxxxxxx/config)
compiler: xtensa-de212-linux-gcc (GCC) 11.2.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://github.com/ammarfaizi2/linux-block/commit/1e2bfe0a0db508e2169bf8d45a8331d430c3a58c
        git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
        git fetch --no-tags ammarfaizi2-block next/linux-next/master
        git checkout 1e2bfe0a0db508e2169bf8d45a8331d430c3a58c
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=xtensa SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

>> arch/xtensa/mm/init.c:220:10: error: redefinition of 'vm_get_page_prot'
     220 | pgprot_t vm_get_page_prot(unsigned long vm_flags)
         |          ^~~~~~~~~~~~~~~~
   In file included from include/linux/memblock.h:12,
                    from arch/xtensa/mm/init.c:21:
   include/linux/mm.h:2838:24: note: previous definition of 'vm_get_page_prot' with type 'pgprot_t(long unsigned int)'
    2838 | static inline pgprot_t vm_get_page_prot(unsigned long vm_flags)
         |                        ^~~~~~~~~~~~~~~~
   arch/xtensa/mm/init.c: In function 'vm_get_page_prot':
>> arch/xtensa/mm/init.c:232:24: error: 'PAGE_READONLY_EXEC' undeclared (first use in this function); did you mean 'PAGE_READONLY'?
     232 |                 return PAGE_READONLY_EXEC;
         |                        ^~~~~~~~~~~~~~~~~~
         |                        PAGE_READONLY
   arch/xtensa/mm/init.c:232:24: note: each undeclared identifier is reported only once for each function it appears in
>> arch/xtensa/mm/init.c:235:24: error: 'PAGE_COPY_EXEC' undeclared (first use in this function); did you mean 'PAGE_COPY'?
     235 |                 return PAGE_COPY_EXEC;
         |                        ^~~~~~~~~~~~~~
         |                        PAGE_COPY
>> arch/xtensa/mm/init.c:248:24: error: 'PAGE_SHARED_EXEC' undeclared (first use in this function); did you mean 'PAGE_SHARED'?
     248 |                 return PAGE_SHARED_EXEC;
         |                        ^~~~~~~~~~~~~~~~
         |                        PAGE_SHARED


vim +/vm_get_page_prot +220 arch/xtensa/mm/init.c

   219	
 > 220	pgprot_t vm_get_page_prot(unsigned long vm_flags)
   221	{
   222		switch (vm_flags & (VM_READ | VM_WRITE | VM_EXEC | VM_SHARED)) {
   223		case VM_NONE:
   224			return PAGE_NONE;
   225		case VM_READ:
   226			return PAGE_READONLY;
   227		case VM_WRITE:
   228		case VM_WRITE | VM_READ:
   229			return PAGE_COPY;
   230		case VM_EXEC:
   231		case VM_EXEC | VM_READ:
 > 232			return PAGE_READONLY_EXEC;
   233		case VM_EXEC | VM_WRITE:
   234		case VM_EXEC | VM_WRITE | VM_READ:
 > 235			return PAGE_COPY_EXEC;
   236		case VM_SHARED:
   237			return PAGE_NONE;
   238		case VM_SHARED | VM_READ:
   239			return PAGE_READONLY;
   240		case VM_SHARED | VM_WRITE:
   241		case VM_SHARED | VM_WRITE | VM_READ:
   242			return PAGE_SHARED;
   243		case VM_SHARED | VM_EXEC:
   244		case VM_SHARED | VM_EXEC | VM_READ:
   245			return PAGE_READONLY_EXEC;
   246		case VM_SHARED | VM_EXEC | VM_WRITE:
   247		case VM_SHARED | VM_EXEC | VM_WRITE | VM_READ:
 > 248			return PAGE_SHARED_EXEC;

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx




[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