Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [davidhildenbrand:b4/bootmem_info 10/19] arch/s390/mm/vmem.c:42:15: warning: unused variable 'nr_pages'
@ 2026-05-06  8:24 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-05-06  8:24 UTC (permalink / raw)
  To: David Hildenbrand (Arm); +Cc: llvm, oe-kbuild-all

tree:   https://github.com/davidhildenbrand/linux b4/bootmem_info
head:   9bd8b9ac2bf1b3e7ffee070da9c2f0607c507207
commit: ad0ab8ac08f34bb72542795d52e15d8b5d174973 [10/19] s390/mm: use free_reserved_pages() in vmem_free_pages()
config: s390-allnoconfig (https://download.01.org/0day-ci/archive/20260506/202605061622.0MCmYK6p-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 5bac06718f502014fade905512f1d26d578a18f3)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260506/202605061622.0MCmYK6p-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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202605061622.0MCmYK6p-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> arch/s390/mm/vmem.c:42:15: warning: unused variable 'nr_pages' [-Wunused-variable]
      42 |         unsigned int nr_pages = 1 << order;
         |                      ^~~~~~~~
   1 warning generated.


vim +/nr_pages +42 arch/s390/mm/vmem.c

67060d9c1f5d91 Heiko Carstens          2008-05-30  39  
1a65b73ae9abd6 Sumanth Korikkar        2024-01-08  40  static void vmem_free_pages(unsigned long addr, int order, struct vmem_altmap *altmap)
9ec8fa8dc331be David Hildenbrand       2020-07-22  41  {
d5e88d32de4e4c Sumanth Korikkar        2025-10-10 @42  	unsigned int nr_pages = 1 << order;
d5e88d32de4e4c Sumanth Korikkar        2025-10-10  43  	struct page *page;
d5e88d32de4e4c Sumanth Korikkar        2025-10-10  44  
1a65b73ae9abd6 Sumanth Korikkar        2024-01-08  45  	if (altmap) {
1a65b73ae9abd6 Sumanth Korikkar        2024-01-08  46  		vmem_altmap_free(altmap, 1 << order);
1a65b73ae9abd6 Sumanth Korikkar        2024-01-08  47  		return;
1a65b73ae9abd6 Sumanth Korikkar        2024-01-08  48  	}
d5e88d32de4e4c Sumanth Korikkar        2025-10-10  49  	page = virt_to_page((void *)addr);
d5e88d32de4e4c Sumanth Korikkar        2025-10-10  50  	if (PageReserved(page)) {
d5e88d32de4e4c Sumanth Korikkar        2025-10-10  51  		/* allocated from memblock */
ad0ab8ac08f34b David Hildenbrand (Arm  2026-03-12  52) 		free_reserved_pages(page, order);
d5e88d32de4e4c Sumanth Korikkar        2025-10-10  53  	} else {
9ec8fa8dc331be David Hildenbrand       2020-07-22  54  		free_pages(addr, order);
9ec8fa8dc331be David Hildenbrand       2020-07-22  55  	}
d5e88d32de4e4c Sumanth Korikkar        2025-10-10  56  }
9ec8fa8dc331be David Hildenbrand       2020-07-22  57  

:::::: The code at line 42 was first introduced by commit
:::::: d5e88d32de4e4ce289d107939da970763669d631 s390/mm: Support removal of boot-allocated virtual memory map

:::::: TO: Sumanth Korikkar <sumanthk@linux.ibm.com>
:::::: CC: Heiko Carstens <hca@linux.ibm.com>

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-05-06  8:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-06  8:24 [davidhildenbrand:b4/bootmem_info 10/19] arch/s390/mm/vmem.c:42:15: warning: unused variable 'nr_pages' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox