Re: [PATCH 2/2] mm: memblock: show all region flags in debugfs

kernel test robot <[email protected]>
Newsgroups org.kvack.linux-mm,dev.linux.lists.oe-kbuild-all,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Hi Meijing,

kernel test robot noticed the following build errors:

[auto build test ERROR on akpm-mm/mm-everything]

url:    https://github.com/intel-lab-lkp/linux/commits/Meijing-Zhao/mm-memblock-add-missing-HugeTLB-flag-name/20260819-155421
base:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link:    https://lore.kernel.org/r/20260819075422.2387980-3-zhaomeijing100%40gmail.com
patch subject: [PATCH 2/2] mm: memblock: show all region flags in debugfs
config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20260823/[email protected]/config)
compiler: powerpc64-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260823/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

   In file included from include/linux/kernel.h:25,
                    from mm/memblock.c:9:
>> mm/memblock.c:2805:16: error: 'MEMBLOCK_RSRV_HUGETLB' undeclared here (not in a function); did you mean 'MEMBLOCK_RSRV_KERN'?
    2805 |         [ilog2(MEMBLOCK_RSRV_HUGETLB)] = "RSV_HUGETLB",
         |                ^~~~~~~~~~~~~~~~~~~~~
   include/linux/log2.h:158:30: note: in definition of macro 'ilog2'
     158 |         __builtin_constant_p(n) ?       \
         |                              ^
>> include/linux/log2.h:157:1: error: array index in initializer not of integer type
     157 | ( \
         | ^
   mm/memblock.c:2805:10: note: in expansion of macro 'ilog2'
    2805 |         [ilog2(MEMBLOCK_RSRV_HUGETLB)] = "RSV_HUGETLB",
         |          ^~~~~
   include/linux/log2.h:157:1: note: (near initialization for 'flagname')
   mm/memblock.c:2805:10: note: in expansion of macro 'ilog2'
    2805 |         [ilog2(MEMBLOCK_RSRV_HUGETLB)] = "RSV_HUGETLB",
         |          ^~~~~


vim +2805 mm/memblock.c

  2794	
  2795	#ifdef CONFIG_DEBUG_FS
  2796	#ifdef CONFIG_ARCH_KEEP_MEMBLOCK
  2797	static const char * const flagname[] = {
  2798		[ilog2(MEMBLOCK_HOTPLUG)] = "HOTPLUG",
  2799		[ilog2(MEMBLOCK_MIRROR)] = "MIRROR",
  2800		[ilog2(MEMBLOCK_NOMAP)] = "NOMAP",
  2801		[ilog2(MEMBLOCK_DRIVER_MANAGED)] = "DRV_MNG",
  2802		[ilog2(MEMBLOCK_RSRV_NOINIT)] = "RSV_NIT",
  2803		[ilog2(MEMBLOCK_RSRV_KERN)] = "RSV_KERN",
  2804		[ilog2(MEMBLOCK_KHO_SCRATCH)] = "KHO_SCRATCH",
> 2805		[ilog2(MEMBLOCK_RSRV_HUGETLB)] = "RSV_HUGETLB",
  2806	};
  2807	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.