linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Pasha Tatashin <pasha.tatashin@soleen.com>
Cc: oe-kbuild-all@lists.linux.dev,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: [akpm-mm:mm-unstable 23/225] mm/page_ext.c:323:29: warning: variable 'pgdat' set but not used
Date: Fri, 9 Aug 2024 01:22:04 +0800	[thread overview]
Message-ID: <202408090125.PxGk56zJ-lkp@intel.com> (raw)

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


             reply	other threads:[~2024-08-08 17:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-08 17:22 kernel test robot [this message]
2024-08-08 17:33 ` Pasha Tatashin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202408090125.PxGk56zJ-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pasha.tatashin@soleen.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox