[akpm-mm:mm-unstable 23/225] mm/page_ext.c:323:29: warning: variable 'pgdat' set but not used

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
head:   275d686abcb590d862b74e2670533d93fd10e58c
commit: 129bae385a761c7fd88874ad46e27d7eb739bd80 [23/225] mm: don't account memmap per node
config: i386-randconfig-141-20240808 (https://download.01.org/0day-ci/archive/20240809/202408090125.PxGk56zJ-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240809/202408090125.PxGk56zJ-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/202408090125.PxGk56zJ-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   mm/page_ext.c: In function 'free_page_ext':
>> mm/page_ext.c:323:29: warning: variable 'pgdat' set but not used [-Wunused-but-set-variable]
     323 |         struct pglist_data *pgdat;
         |                             ^~~~~


vim +/pgdat +323 mm/page_ext.c

76af6a054da405 Dave Hansen     2021-10-18  318  
eefa864b701d78 Joonsoo Kim     2014-12-12  319  static void free_page_ext(void *addr)
eefa864b701d78 Joonsoo Kim     2014-12-12  320  {
eefa864b701d78 Joonsoo Kim     2014-12-12  321  	size_t table_size;
15995a35247442 Sourav Panda    2024-06-05  322  	struct page *page;
15995a35247442 Sourav Panda    2024-06-05 @323  	struct pglist_data *pgdat;
eefa864b701d78 Joonsoo Kim     2014-12-12  324  
5556cfe8d994d5 Vlastimil Babka 2019-10-14  325  	table_size = page_ext_size * PAGES_PER_SECTION;
eefa864b701d78 Joonsoo Kim     2014-12-12  326  
15995a35247442 Sourav Panda    2024-06-05  327  	if (is_vmalloc_addr(addr)) {
15995a35247442 Sourav Panda    2024-06-05  328  		page = vmalloc_to_page(addr);
15995a35247442 Sourav Panda    2024-06-05  329  		pgdat = page_pgdat(page);
129bae385a761c Pasha Tatashin  2024-08-07  330  		mod_memmap(-1L * (DIV_ROUND_UP(table_size, PAGE_SIZE)));
15995a35247442 Sourav Panda    2024-06-05  331  		vfree(addr);
15995a35247442 Sourav Panda    2024-06-05  332  	} else {
15995a35247442 Sourav Panda    2024-06-05  333  		page = virt_to_page(addr);
15995a35247442 Sourav Panda    2024-06-05  334  		pgdat = page_pgdat(page);
129bae385a761c Pasha Tatashin  2024-08-07  335  		mod_memmap(-1L * (DIV_ROUND_UP(table_size, PAGE_SIZE)));
eefa864b701d78 Joonsoo Kim     2014-12-12  336  		BUG_ON(PageReserved(page));
0c81585499601a Qian Cai        2019-03-05  337  		kmemleak_free(addr);
eefa864b701d78 Joonsoo Kim     2014-12-12  338  		free_pages_exact(addr, table_size);
eefa864b701d78 Joonsoo Kim     2014-12-12  339  	}
eefa864b701d78 Joonsoo Kim     2014-12-12  340  }
eefa864b701d78 Joonsoo Kim     2014-12-12  341  

:::::: The code at line 323 was first introduced by commit
:::::: 15995a35247442aefa0ffe36a6dad51cb46b0918 mm: report per-page metadata information

:::::: TO: Sourav Panda <souravpanda@xxxxxxxxxx>
:::::: CC: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>

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