Re: [PATCH] mm/cma: print total and used pages in cma_alloc()
From: kernel test robot
Date: Sat Aug 16 2025 - 12:31:13 EST
Hi Xiang,
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/Xiang-Gao/mm-cma-print-total-and-used-pages-in-cma_alloc/20250816-122940
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/20250816042842.3959315-1-gxxa03070307%40gmail.com
patch subject: [PATCH] mm/cma: print total and used pages in cma_alloc()
config: arm-randconfig-002-20250816 (https://download.01.org/0day-ci/archive/20250817/202508170014.PK57XSd7-lkp@xxxxxxxxx/config)
compiler: arm-linux-gnueabi-gcc (GCC) 10.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250817/202508170014.PK57XSd7-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/202508170014.PK57XSd7-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
mm/cma.c: In function 'cma_get_used_pages':
>> mm/cma.c:784:26: error: 'struct cma' has no member named 'bitmap'
784 | used = bitmap_weight(cma->bitmap, (int)cma_bitmap_maxno(cma));
| ^~
>> mm/cma.c:784:41: error: too few arguments to function 'cma_bitmap_maxno'
784 | used = bitmap_weight(cma->bitmap, (int)cma_bitmap_maxno(cma));
| ^~~~~~~~~~~~~~~~
In file included from mm/cma.c:34:
mm/cma.h:77:29: note: declared here
77 | static inline unsigned long cma_bitmap_maxno(struct cma *cma,
| ^~~~~~~~~~~~~~~~
vim +784 mm/cma.c
778
779 static unsigned long cma_get_used_pages(struct cma *cma)
780 {
781 unsigned long used;
782
783 spin_lock_irq(&cma->lock);
> 784 used = bitmap_weight(cma->bitmap, (int)cma_bitmap_maxno(cma));
785 spin_unlock_irq(&cma->lock);
786
787 return used << cma->order_per_bit;
788 }
789
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki