[akpm-mm:mm-unstable 170/172] mm/z3fold.c:353:3: error: call to undeclared function 'lock_page'; ISO C99 and later do not support implicit function declarations

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
head:   6e165f54437931f329d09dca6c19d99af08a36e1
commit: 98a9217fdcb8c8a64670a57180fdfc2f468e4ff0 [170/172] mempolicy.h: remove unnecessary header file inclusions
config: x86_64-buildonly-randconfig-005-20241207 (https://download.01.org/0day-ci/archive/20241207/202412072238.EJIJEJfz-lkp@xxxxxxxxx/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241207/202412072238.EJIJEJfz-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412072238.EJIJEJfz-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   In file included from mm/z3fold.c:30:
   In file included from include/linux/mm.h:2287:
   include/linux/vmstat.h:504:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     504 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     505 |                            item];
         |                            ~~~~
   include/linux/vmstat.h:511:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     511 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     512 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     518 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   include/linux/vmstat.h:524:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     524 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     525 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
>> mm/z3fold.c:353:3: error: call to undeclared function 'lock_page'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     353 |                 lock_page(page);
         |                 ^
   mm/z3fold.c:353:3: note: did you mean 'copy_page'?
   arch/x86/include/asm/page_64.h:62:6: note: 'copy_page' declared here
      62 | void copy_page(void *to, void *from);
         |      ^
>> mm/z3fold.c:355:3: error: call to undeclared function 'unlock_page'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     355 |                 unlock_page(page);
         |                 ^
   mm/z3fold.c:1052:3: error: call to undeclared function 'lock_page'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    1052 |                 lock_page(page);
         |                 ^
   mm/z3fold.c:1054:3: error: call to undeclared function 'unlock_page'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    1054 |                 unlock_page(page);
         |                 ^
>> mm/z3fold.c:1056:12: error: call to undeclared function 'trylock_page'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    1056 |                 WARN_ON(!trylock_page(page));
         |                          ^
   mm/z3fold.c:1056:12: note: did you mean 'try_get_page'?
   include/linux/mm.h:1527:33: note: 'try_get_page' declared here
    1527 | static inline __must_check bool try_get_page(struct page *page)
         |                                 ^
   mm/z3fold.c:1058:3: error: call to undeclared function 'unlock_page'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    1058 |                 unlock_page(page);
         |                 ^
   4 warnings and 6 errors generated.


vim +/lock_page +353 mm/z3fold.c

9a001fc19cccde Vitaly Wool 2016-05-20  348  
9a001fc19cccde Vitaly Wool 2016-05-20  349  /* Resets the struct page fields and frees the page */
1f862989b04ade Vitaly Wool 2019-05-13  350  static void free_z3fold_page(struct page *page, bool headless)
9a001fc19cccde Vitaly Wool 2016-05-20  351  {
1f862989b04ade Vitaly Wool 2019-05-13  352  	if (!headless) {
1f862989b04ade Vitaly Wool 2019-05-13 @353  		lock_page(page);
1f862989b04ade Vitaly Wool 2019-05-13  354  		__ClearPageMovable(page);
1f862989b04ade Vitaly Wool 2019-05-13 @355  		unlock_page(page);
1f862989b04ade Vitaly Wool 2019-05-13  356  	}
5a27aa8220290b Vitaly Wool 2017-02-24  357  	__free_page(page);
5a27aa8220290b Vitaly Wool 2017-02-24  358  }
5a27aa8220290b Vitaly Wool 2017-02-24  359  

:::::: The code at line 353 was first introduced by commit
:::::: 1f862989b04ade61d3aab49184c50e9957f84c7d mm/z3fold.c: support page migration

:::::: TO: Vitaly Wool <vitalywool@xxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[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