From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Julia Lawall <julia.lawall@inria.fr>
Subject: [linux-next:master 10772/12447] mm/hugetlb.c:3668:21-30: opportunity for str_plural(nrinvalid)
Date: Thu, 20 Mar 2025 16:07:29 +0800 [thread overview]
Message-ID: <202503201522.13UePnXd-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Frank van der Linden <fvdl@google.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: ff7f9b199e3f4cc7d61df5a9a26a7cbb5c1492e6
commit: 14ed3a595fa4e8f5bceddb91cbcd1ba566c9669b [10772/12447] mm/hugetlb: check bootmem pages for zone intersections
:::::: branch date: 22 hours ago
:::::: commit date: 3 days ago
config: x86_64-randconfig-r054-20250320 (https://download.01.org/0day-ci/archive/20250320/202503201522.13UePnXd-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
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>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202503201522.13UePnXd-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> mm/hugetlb.c:3668:21-30: opportunity for str_plural(nrinvalid)
vim +3668 mm/hugetlb.c
e5ff215941d59f Andi Kleen 2008-07-23 3651
e5ff215941d59f Andi Kleen 2008-07-23 3652 static void __init report_hugepages(void)
e5ff215941d59f Andi Kleen 2008-07-23 3653 {
e5ff215941d59f Andi Kleen 2008-07-23 3654 struct hstate *h;
14ed3a595fa4e8 Frank van der Linden 2025-02-28 3655 unsigned long nrinvalid;
e5ff215941d59f Andi Kleen 2008-07-23 3656
e5ff215941d59f Andi Kleen 2008-07-23 3657 for_each_hstate(h) {
4abd32dbab201c Andi Kleen 2008-07-23 3658 char buf[32];
c6247f72d46457 Matthew Wilcox 2017-07-10 3659
14ed3a595fa4e8 Frank van der Linden 2025-02-28 3660 nrinvalid = hstate_boot_nrinvalid[hstate_index(h)];
14ed3a595fa4e8 Frank van der Linden 2025-02-28 3661 h->max_huge_pages -= nrinvalid;
14ed3a595fa4e8 Frank van der Linden 2025-02-28 3662
c6247f72d46457 Matthew Wilcox 2017-07-10 3663 string_get_size(huge_page_size(h), 1, STRING_UNITS_2, buf, 32);
6213834c10de95 Muchun Song 2022-06-28 3664 pr_info("HugeTLB: registered %s page size, pre-allocated %ld pages\n",
c6247f72d46457 Matthew Wilcox 2017-07-10 3665 buf, h->free_huge_pages);
14ed3a595fa4e8 Frank van der Linden 2025-02-28 3666 if (nrinvalid)
14ed3a595fa4e8 Frank van der Linden 2025-02-28 3667 pr_info("HugeTLB: %s page size: %lu invalid page%s discarded\n",
14ed3a595fa4e8 Frank van der Linden 2025-02-28 @3668 buf, nrinvalid, nrinvalid > 1 ? "s" : "");
6213834c10de95 Muchun Song 2022-06-28 3669 pr_info("HugeTLB: %d KiB vmemmap can be freed for a %s page\n",
6213834c10de95 Muchun Song 2022-06-28 3670 hugetlb_vmemmap_optimizable_size(h) / SZ_1K, buf);
e5ff215941d59f Andi Kleen 2008-07-23 3671 }
e5ff215941d59f Andi Kleen 2008-07-23 3672 }
e5ff215941d59f Andi Kleen 2008-07-23 3673
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-03-20 8:08 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=202503201522.13UePnXd-lkp@intel.com \
--to=lkp@intel.com \
--cc=julia.lawall@inria.fr \
--cc=oe-kbuild@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.