linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [akpm-mm:mm-unstable 23/225] mm/page_ext.c:323:29: warning: variable 'pgdat' set but not used
@ 2024-08-08 17:22 kernel test robot
  2024-08-08 17:33 ` Pasha Tatashin
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2024-08-08 17:22 UTC (permalink / raw)
  To: Pasha Tatashin; +Cc: oe-kbuild-all, Andrew Morton, Linux Memory Management List

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@intel.com/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@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/202408090125.PxGk56zJ-lkp@intel.com/

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@google.com>
:::::: CC: Andrew Morton <akpm@linux-foundation.org>

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [akpm-mm:mm-unstable 23/225] mm/page_ext.c:323:29: warning: variable 'pgdat' set but not used
  2024-08-08 17:22 [akpm-mm:mm-unstable 23/225] mm/page_ext.c:323:29: warning: variable 'pgdat' set but not used kernel test robot
@ 2024-08-08 17:33 ` Pasha Tatashin
  0 siblings, 0 replies; 2+ messages in thread
From: Pasha Tatashin @ 2024-08-08 17:33 UTC (permalink / raw)
  To: kernel test robot
  Cc: oe-kbuild-all, Andrew Morton, Linux Memory Management List

On Thu, Aug 8, 2024 at 1:22 PM kernel test robot <lkp@intel.com> wrote:
>
> 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@intel.com/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@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/202408090125.PxGk56zJ-lkp@intel.com/
>
> 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;
>          |                             ^~~~~

Indeed pgdat is not used anymore, I will remove it in my patch.

Pasha


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-08-08 17:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-08 17:22 [akpm-mm:mm-unstable 23/225] mm/page_ext.c:323:29: warning: variable 'pgdat' set but not used kernel test robot
2024-08-08 17:33 ` Pasha Tatashin

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