[koverstreet-bcachefs:bcachefs-garbage 249/258] mm/jitalloc.c:106:2: error: call to undeclared function 'text_poke_copy'; ISO C99 and later do not support implicit function declarations

From: kernel test robot <hidden>
Date: 2024-09-09 17:13:39
Also in: oe-kbuild-all

Hi Kent,

First bad commit (maybe != root cause):

tree:   https://github.com/koverstreet/bcachefs bcachefs-garbage
head:   c88c2220b6b527cec382f06a0ba3feab2a593b37
commit: 0dc0c36d5a2a19098aba0639a99b1574aec0f286 [249/258] bcachefs: switch to jitalloc
config: s390-defconfig (https://download.01.org/0day-ci/archive/20240910/202409100156.1NPAP5yj-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 05f5a91d00b02f4369f46d076411c700755ae041)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240910/202409100156.1NPAP5yj-lkp@intel.com/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 [off-list ref]
| Closes: https://lore.kernel.org/oe-kbuild-all/202409100156.1NPAP5yj-lkp@intel.com/ (local)

All errors (new ones prefixed by >>):

   In file included from mm/jitalloc.c:4:
   In file included from include/linux/highmem.h:10:
   In file included from include/linux/mm.h:2235:
   include/linux/vmstat.h:500:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     500 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     501 |                            item];
         |                            ~~~~
   include/linux/vmstat.h:507:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     507 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     508 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmstat.h:514:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     514 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   include/linux/vmstat.h:519:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     519 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     520 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmstat.h:528:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     528 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     529 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   mm/jitalloc.c:46:28: error: call to undeclared function 'module_alloc'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      46 |         void *executably_mapped = module_alloc(PAGE_SIZE);
         |                                   ^
   mm/jitalloc.c:46:8: error: incompatible integer to pointer conversion initializing 'void *' with an expression of type 'int' [-Wint-conversion]
      46 |         void *executably_mapped = module_alloc(PAGE_SIZE);
         |               ^                   ~~~~~~~~~~~~~~~~~~~~~~~
quoted
mm/jitalloc.c:106:2: error: call to undeclared function 'text_poke_copy'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     106 |         text_poke_copy(buf, new_buf, len);
         |         ^
   mm/jitalloc.c:106:2: note: did you mean 'text_poke_sync'?
   arch/s390/include/asm/text-patching.h:13:6: note: 'text_poke_sync' declared here
      13 | void text_poke_sync(void);
         |      ^
   mm/jitalloc.c:162:7: error: call to undeclared function 'module_alloc'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     162 |                 p = module_alloc(len);
         |                     ^
   mm/jitalloc.c:162:5: error: incompatible integer to pointer conversion assigning to 'void *' from 'int' [-Wint-conversion]
     162 |                 p = module_alloc(len);
         |                   ^ ~~~~~~~~~~~~~~~~~
   5 warnings and 5 errors generated.


vim +/text_poke_copy +106 mm/jitalloc.c

7a091cbeb2d972 Kent Overstreet 2023-05-17  103  
7a091cbeb2d972 Kent Overstreet 2023-05-17  104  void jit_update(void *buf, void *new_buf, size_t len)
7a091cbeb2d972 Kent Overstreet 2023-05-17  105  {
7a091cbeb2d972 Kent Overstreet 2023-05-17 @106  	text_poke_copy(buf, new_buf, len);
7a091cbeb2d972 Kent Overstreet 2023-05-17  107  }
7a091cbeb2d972 Kent Overstreet 2023-05-17  108  EXPORT_SYMBOL_GPL(jit_update);
7a091cbeb2d972 Kent Overstreet 2023-05-17  109  

:::::: The code at line 106 was first introduced by commit
:::::: 7a091cbeb2d972e3dc4d44f00ab2828b7abbbcce mm: jit/text allocator

:::::: TO: Kent Overstreet [off-list ref]
:::::: CC: Kent Overstreet [off-list ref]

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help