From: kernel test robot <lkp@intel.com>
To: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
0day robot <lkp@intel.com>
Subject: mm/memory.c:526:8: warning: variable 'pmd' set but not used
Date: Wed, 10 Jun 2026 13:55:04 +0200 [thread overview]
Message-ID: <202606101305.g9K7xxXx-lkp@intel.com> (raw)
tree: https://github.com/intel-lab-lkp/linux/commits/Anshuman-Khandual/lib-vsprintf-Add-support-for-pgtable-entries/20260610-123818
head: 421f2f321815f6c587e6b455ff0667c00e41beb5
commit: 421f2f321815f6c587e6b455ff0667c00e41beb5 mm: Replace pgtable entry prints with new format
date: 7 hours ago
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20260610/202606101305.g9K7xxXx-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project f43d6834093b19baf79beda8c0337ab020ac5f17)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260610/202606101305.g9K7xxXx-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/202606101305.g9K7xxXx-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> mm/memory.c:526:8: warning: variable 'pmd' set but not used [-Wunused-but-set-variable]
526 | pmd_t pmd, *pmdp;
| ^
1 warning generated.
vim +/pmd +526 mm/memory.c
ec63a44011dcce David Hildenbrand 2025-08-11 521
ec63a44011dcce David Hildenbrand 2025-08-11 522 static void __print_bad_page_map_pgtable(struct mm_struct *mm, unsigned long addr)
ec63a44011dcce David Hildenbrand 2025-08-11 523 {
ec63a44011dcce David Hildenbrand 2025-08-11 524 p4d_t p4d, *p4dp;
ec63a44011dcce David Hildenbrand 2025-08-11 525 pud_t pud, *pudp;
ec63a44011dcce David Hildenbrand 2025-08-11 @526 pmd_t pmd, *pmdp;
ec63a44011dcce David Hildenbrand 2025-08-11 527 pgd_t *pgdp;
ec63a44011dcce David Hildenbrand 2025-08-11 528
ec63a44011dcce David Hildenbrand 2025-08-11 529 /*
ec63a44011dcce David Hildenbrand 2025-08-11 530 * Although this looks like a fully lockless pgtable walk, it is not:
ec63a44011dcce David Hildenbrand 2025-08-11 531 * see locking requirements for print_bad_page_map().
ec63a44011dcce David Hildenbrand 2025-08-11 532 */
ec63a44011dcce David Hildenbrand 2025-08-11 533 pgdp = pgd_offset(mm, addr);
ec63a44011dcce David Hildenbrand 2025-08-11 534
ec63a44011dcce David Hildenbrand 2025-08-11 535 if (!pgd_present(*pgdp) || pgd_leaf(*pgdp)) {
421f2f321815f6 Anshuman Khandual 2026-06-10 536 pr_alert("pgd:%ppgd\n", pgdp);
ec63a44011dcce David Hildenbrand 2025-08-11 537 return;
ec63a44011dcce David Hildenbrand 2025-08-11 538 }
ec63a44011dcce David Hildenbrand 2025-08-11 539
ec63a44011dcce David Hildenbrand 2025-08-11 540 p4dp = p4d_offset(pgdp, addr);
ec63a44011dcce David Hildenbrand 2025-08-11 541 p4d = p4dp_get(p4dp);
ec63a44011dcce David Hildenbrand 2025-08-11 542
ec63a44011dcce David Hildenbrand 2025-08-11 543 if (!p4d_present(p4d) || p4d_leaf(p4d)) {
421f2f321815f6 Anshuman Khandual 2026-06-10 544 pr_alert("pgd:%ppgd p4d:%pp4d\n", pgdp, p4dp);
ec63a44011dcce David Hildenbrand 2025-08-11 545 return;
ec63a44011dcce David Hildenbrand 2025-08-11 546 }
ec63a44011dcce David Hildenbrand 2025-08-11 547
ec63a44011dcce David Hildenbrand 2025-08-11 548 pudp = pud_offset(p4dp, addr);
ec63a44011dcce David Hildenbrand 2025-08-11 549 pud = pudp_get(pudp);
ec63a44011dcce David Hildenbrand 2025-08-11 550
ec63a44011dcce David Hildenbrand 2025-08-11 551 if (!pud_present(pud) || pud_leaf(pud)) {
421f2f321815f6 Anshuman Khandual 2026-06-10 552 pr_alert("pgd:%ppgd p4d:%pp4d pud:%ppud\n", pgdp, p4dp, pudp);
ec63a44011dcce David Hildenbrand 2025-08-11 553 return;
ec63a44011dcce David Hildenbrand 2025-08-11 554 }
ec63a44011dcce David Hildenbrand 2025-08-11 555
ec63a44011dcce David Hildenbrand 2025-08-11 556 pmdp = pmd_offset(pudp, addr);
ec63a44011dcce David Hildenbrand 2025-08-11 557 pmd = pmdp_get(pmdp);
ec63a44011dcce David Hildenbrand 2025-08-11 558
ec63a44011dcce David Hildenbrand 2025-08-11 559 /*
ec63a44011dcce David Hildenbrand 2025-08-11 560 * Dumping the PTE would be nice, but it's tricky with CONFIG_HIGHPTE,
ec63a44011dcce David Hildenbrand 2025-08-11 561 * because the table should already be mapped by the caller and
ec63a44011dcce David Hildenbrand 2025-08-11 562 * doing another map would be bad. print_bad_page_map() should
ec63a44011dcce David Hildenbrand 2025-08-11 563 * already take care of printing the PTE.
ec63a44011dcce David Hildenbrand 2025-08-11 564 */
421f2f321815f6 Anshuman Khandual 2026-06-10 565 pr_alert("pgd:%ppgd p4d:%pp4d pud:%ppud pmd:%ppmd\n", pgdp,
421f2f321815f6 Anshuman Khandual 2026-06-10 566 p4dp, pudp, pmdp);
ec63a44011dcce David Hildenbrand 2025-08-11 567 }
ec63a44011dcce David Hildenbrand 2025-08-11 568
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-06-10 11:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202606101305.g9K7xxXx-lkp@intel.com \
--to=lkp@intel.com \
--cc=anshuman.khandual@arm.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
/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