[linux-next:master 5933/6583] include/linux/page_ext.h:131:20: error: call to undeclared function 'page_to_section'; 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/next/linux-next.git master
head:   8433c776e1eb1371f5cd40b5fd3a61f9c7b7f3ad
commit: a2d6e9c1a867bb9f13943cb8483e2ab85b630bcd [5933/6583] mm: page_ext: add an iteration API for page extensions
config: i386-buildonly-randconfig-004-20250226 (https://download.01.org/0day-ci/archive/20250226/202502261733.Ma0eUGKJ-lkp@xxxxxxxxx/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250226/202502261733.Ma0eUGKJ-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/202502261733.Ma0eUGKJ-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   In file included from arch/x86/kernel/asm-offsets.c:14:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:21:
   In file included from include/linux/mm.h:8:
   In file included from include/linux/pgalloc_tag.h:12:
>> include/linux/page_ext.h:131:20: error: call to undeclared function 'page_to_section'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     131 |         iter->start_pfn = page_to_pfn(page);
         |                           ^
   include/asm-generic/memory_model.h:64:21: note: expanded from macro 'page_to_pfn'
      64 | #define page_to_pfn __page_to_pfn
         |                     ^
   include/asm-generic/memory_model.h:47:14: note: expanded from macro '__page_to_pfn'
      47 |         int __sec = page_to_section(__pg);                      \
         |                     ^
   include/linux/page_ext.h:131:20: note: did you mean '__nr_to_section'?
   include/asm-generic/memory_model.h:64:21: note: expanded from macro 'page_to_pfn'
      64 | #define page_to_pfn __page_to_pfn
         |                     ^
   include/asm-generic/memory_model.h:47:14: note: expanded from macro '__page_to_pfn'
      47 |         int __sec = page_to_section(__pg);                      \
         |                     ^
   include/linux/mmzone.h:1907:35: note: '__nr_to_section' declared here
    1907 | static inline struct mem_section *__nr_to_section(unsigned long nr)
         |                                   ^
   In file included from arch/x86/kernel/asm-offsets.c:14:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:21:
>> include/linux/mm.h:1965:29: error: static declaration of 'page_to_section' follows non-static declaration
    1965 | static inline unsigned long page_to_section(const struct page *page)
         |                             ^
   include/linux/page_ext.h:131:20: note: previous implicit declaration is here
     131 |         iter->start_pfn = page_to_pfn(page);
         |                           ^
   include/asm-generic/memory_model.h:64:21: note: expanded from macro 'page_to_pfn'
      64 | #define page_to_pfn __page_to_pfn
         |                     ^
   include/asm-generic/memory_model.h:47:14: note: expanded from macro '__page_to_pfn'
      47 |         int __sec = page_to_section(__pg);                      \
         |                     ^
   In file included from arch/x86/kernel/asm-offsets.c:14:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:21:
   In file included from include/linux/mm.h:2302:
   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_"
         |                               ~~~~~~~~~~~ ^ ~~~
   1 warning and 2 errors generated.
   make[3]: *** [scripts/Makefile.build:102: arch/x86/kernel/asm-offsets.s] Error 1 shuffle=1287424088
   make[3]: Target 'prepare' not remade because of errors.
   make[2]: *** [Makefile:1264: prepare0] Error 2 shuffle=1287424088
   make[2]: Target 'prepare' not remade because of errors.
   make[1]: *** [Makefile:251: __sub-make] Error 2 shuffle=1287424088
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:251: __sub-make] Error 2 shuffle=1287424088
   make: Target 'prepare' not remade because of errors.


vim +/page_to_section +131 include/linux/page_ext.h

   118	
   119	/**
   120	 * page_ext_iter_begin() - Prepare for iterating through page extensions.
   121	 * @iter: page extension iterator.
   122	 * @page: The page we're interested in.
   123	 *
   124	 * Must be called with RCU read lock taken.
   125	 *
   126	 * Return: NULL if no page_ext exists for this page.
   127	 */
   128	static inline struct page_ext *page_ext_iter_begin(struct page_ext_iter *iter, struct page *page)
   129	{
   130		iter->index = 0;
 > 131		iter->start_pfn = page_to_pfn(page);
   132		iter->page_ext = lookup_page_ext(page);
   133	
   134		return iter->page_ext;
   135	}
   136	

-- 
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