From: kernel test robot <lkp@intel.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: oe-kbuild-all@lists.linux.dev,
David Hildenbrand <david@kernel.org>,
Linux Memory Management List <linux-mm@kvack.org>,
mm-commits@vger.kernel.org, Davidlohr Bueso <dave@stgolabs.net>
Subject: [akpm-mm:mm-new 115/182] mm/internal.h:847:26: warning: implicit conversion from 'unsigned long long' to 'u32' (aka 'unsigned int') changes value from 17179869184 to 0
Date: Thu, 30 Apr 2026 21:07:13 +0800 [thread overview]
Message-ID: <202604302039.yKocJk8m-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-new
head: 0587fb0c820d86e5b77a975680d79b5176d09abb
commit: 78c22ab4ad70900027ae72e857274535c798ccfb [115/182] include/asm-generic/fixmap.h: reimplement nasty macros in C
config: riscv-allmodconfig (https://download.01.org/0day-ci/archive/20260430/202604302039.yKocJk8m-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 5bac06718f502014fade905512f1d26d578a18f3)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260430/202604302039.yKocJk8m-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/202604302039.yKocJk8m-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from mm/early_ioremap.c:18:
In file included from arch/riscv/include/asm/fixmap.h:64:
include/asm-generic/fixmap.h:93:26: error: use of undeclared identifier 'PAGE_KERNEL_NOCACHE'
93 | __set_fixmap(idx, phys, FIXMAP_PAGE_NOCACHE);
| ^~~~~~~~~~~~~~~~~~~
include/asm-generic/fixmap.h:54:29: note: expanded from macro 'FIXMAP_PAGE_NOCACHE'
54 | #define FIXMAP_PAGE_NOCACHE PAGE_KERNEL_NOCACHE
| ^~~~~~~~~~~~~~~~~~~
include/asm-generic/fixmap.h:99:33: error: use of undeclared identifier 'PAGE_KERNEL_NOCACHE'
99 | __set_fixmap_offset(idx, phys, FIXMAP_PAGE_NOCACHE);
| ^~~~~~~~~~~~~~~~~~~
include/asm-generic/fixmap.h:54:29: note: expanded from macro 'FIXMAP_PAGE_NOCACHE'
54 | #define FIXMAP_PAGE_NOCACHE PAGE_KERNEL_NOCACHE
| ^~~~~~~~~~~~~~~~~~~
In file included from mm/early_ioremap.c:20:
>> mm/internal.h:847:26: warning: implicit conversion from 'unsigned long long' to 'u32' (aka 'unsigned int') changes value from 17179869184 to 0 [-Wconstant-conversion]
847 | VM_WARN_ON_ONCE(order > MAX_FOLIO_ORDER);
| ^~~~~~~~~~~~~~~
include/linux/mmzone.h:85:33: note: expanded from macro 'MAX_FOLIO_ORDER'
85 | #define MAX_FOLIO_ORDER (ilog2(SZ_16G) - PAGE_SHIFT)
| ~~~~~~^~~~~~~
include/linux/sizes.h:56:19: note: expanded from macro 'SZ_16G'
56 | #define SZ_16G _AC(0x400000000, ULL)
| ^~~~~~~~~~~~~~~~~~~~~
include/uapi/linux/const.h:21:18: note: expanded from macro '_AC'
21 | #define _AC(X,Y) __AC(X,Y)
| ^~~~~~~~~
note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/log2.h:162:14: note: expanded from macro 'ilog2'
162 | __ilog2_u32(n) : \
| ~~~~~~~~~~~ ^
include/linux/mmdebug.h:123:50: note: expanded from macro 'VM_WARN_ON_ONCE'
123 | #define VM_WARN_ON_ONCE(cond) (void)WARN_ON_ONCE(cond)
| ^~~~
include/asm-generic/bug.h:120:25: note: expanded from macro 'WARN_ON_ONCE'
120 | int __ret_warn_on = !!(condition); \
| ^~~~~~~~~
1 warning and 2 errors generated.
vim +847 mm/internal.h
904d58578fce53 Kefeng Wang 2023-05-16 831
3c605096d31582 Joonsoo Kim 2014-11-13 832 extern int __isolate_free_page(struct page *page, unsigned int order);
624f58d8f46396 Alexander Duyck 2020-04-06 833 extern void __putback_isolated_page(struct page *page, unsigned int order,
624f58d8f46396 Alexander Duyck 2020-04-06 834 int mt);
58e3e5265484a1 Shengming Hu 2025-12-29 835 extern void memblock_free_pages(unsigned long pfn, unsigned int order);
13c526540b3169 David Hildenbrand 2024-06-07 836 extern void __free_pages_core(struct page *page, unsigned int order,
13c526540b3169 David Hildenbrand 2024-06-07 837 enum meminit_context context);
9420f89db2dd61 Mike Rapoport (IBM 2023-03-21 838)
1e3be4856f49d5 Tarun Sahu 2023-06-12 839 /*
1e3be4856f49d5 Tarun Sahu 2023-06-12 840 * This will have no effect, other than possibly generating a warning, if the
1e3be4856f49d5 Tarun Sahu 2023-06-12 841 * caller passes in a non-large folio.
1e3be4856f49d5 Tarun Sahu 2023-06-12 842 */
1e3be4856f49d5 Tarun Sahu 2023-06-12 843 static inline void folio_set_order(struct folio *folio, unsigned int order)
1e3be4856f49d5 Tarun Sahu 2023-06-12 844 {
1e3be4856f49d5 Tarun Sahu 2023-06-12 845 if (WARN_ON_ONCE(!order || !folio_test_large(folio)))
1e3be4856f49d5 Tarun Sahu 2023-06-12 846 return;
99132d24d76511 David Hildenbrand 2025-09-01 @847 VM_WARN_ON_ONCE(order > MAX_FOLIO_ORDER);
1e3be4856f49d5 Tarun Sahu 2023-06-12 848
ebc1baf5c9b46c Matthew Wilcox (Oracle 2023-08-16 849) folio->_flags_1 = (folio->_flags_1 & ~0xffUL) | order;
4996fc547f5b49 David Hildenbrand 2025-03-03 850 #ifdef NR_PAGES_IN_LARGE_FOLIO
4996fc547f5b49 David Hildenbrand 2025-03-03 851 folio->_nr_pages = 1U << order;
1e3be4856f49d5 Tarun Sahu 2023-06-12 852 #endif
1e3be4856f49d5 Tarun Sahu 2023-06-12 853 }
1e3be4856f49d5 Tarun Sahu 2023-06-12 854
:::::: The code at line 847 was first introduced by commit
:::::: 99132d24d76511f0f6ded2e25448765b632794aa mm: sanity-check maximum folio size in folio_set_order()
:::::: TO: David Hildenbrand <david@redhat.com>
:::::: CC: Andrew Morton <akpm@linux-foundation.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-04-30 13:11 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=202604302039.yKocJk8m-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=dave@stgolabs.net \
--cc=david@kernel.org \
--cc=linux-mm@kvack.org \
--cc=mm-commits@vger.kernel.org \
--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