Hi Matthew, kernel test robot noticed the following build warnings: [auto build test WARNING on akpm-mm/mm-everything] [also build test WARNING on next-20240327] [cannot apply to jcmvbkbc-xtensa/xtensa-for-next arm64/for-next/core s390/features tj-cgroup/for-next linus/master vbabka-slab/for-next v6.9-rc1] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Matthew-Wilcox-Oracle/sh-Remove-use-of-PG_arch_1-on-individual-pages/20240327-011221 base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything patch link: https://lore.kernel.org/r/20240326171045.410737-8-willy%40infradead.org patch subject: [PATCH 07/10] mm: Convert arch_clear_hugepage_flags to take a folio config: riscv-defconfig (https://download.01.org/0day-ci/archive/20240327/202403272336.lPdKvPYd-lkp@xxxxxxxxx/config) compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 23de3862dce582ce91c1aa914467d982cb1a73b4) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240327/202403272336.lPdKvPYd-lkp@xxxxxxxxx/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@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202403272336.lPdKvPYd-lkp@xxxxxxxxx/ All warnings (new ones prefixed by >>): In file included from arch/riscv/mm/init.c:10: In file included from include/linux/mm.h:2239: include/linux/vmstat.h:514:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 514 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ In file included from arch/riscv/mm/init.c:22: include/linux/hugetlb.h:840:20: error: redefinition of 'arch_clear_hugetlb_flags' 840 | static inline void arch_clear_hugetlb_flags(struct folio *folio) { } | ^ arch/riscv/include/asm/hugetlb.h:12:34: note: expanded from macro 'arch_clear_hugetlb_flags' 12 | #define arch_clear_hugetlb_flags arch_clear_hugetlb_flags | ^ arch/riscv/include/asm/hugetlb.h:8:20: note: previous definition is here 8 | static inline void arch_clear_hugetlb_flags(struct folio *folio) | ^ >> arch/riscv/mm/init.c:112:22: warning: implicit conversion from 'unsigned long long' to 'u32' (aka 'unsigned int') changes value from 1099511627776 to 0 [-Wconstant-conversion] 112 | (((t) - (b)) >> LOG2_SZ_1T)); | ^~~~~~~~~~ include/linux/printk.h:520:36: note: expanded from macro 'pr_notice' 520 | printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~~~~~ include/linux/printk.h:457:60: note: expanded from macro 'printk' 457 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) | ^~~~~~~~~~~ include/linux/printk.h:429:19: note: expanded from macro 'printk_index_wrap' 429 | _p_func(_fmt, ##__VA_ARGS__); \ | ^~~~~~~~~~~ note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/uapi/linux/const.h:20:20: note: expanded from macro '__AC' 20 | #define __AC(X,Y) (X##Y) | ^~~~ <scratch space>:5:1: note: expanded from here 5 | 0x10000000000ULL | ^~~~~~~~~~~~~~~~ include/linux/log2.h:162:14: note: expanded from macro 'ilog2' 162 | __ilog2_u32(n) : \ | ~~~~~~~~~~~ ^ arch/riscv/mm/init.c:122:43: warning: implicit conversion from 'unsigned long long' to 'u32' (aka 'unsigned int') changes value from 1099511627776 to 0 [-Wconstant-conversion] 122 | if (IS_ENABLED(CONFIG_64BIT) && (diff >> LOG2_SZ_1T) >= 10) | ^~~~~~~~~~ arch/riscv/mm/init.c:88:27: note: expanded from macro 'LOG2_SZ_1T' 88 | #define LOG2_SZ_1T ilog2(SZ_1T) | ~~~~~~^~~~~~ include/linux/sizes.h:55:18: note: expanded from macro 'SZ_1T' 55 | #define SZ_1T _AC(0x10000000000, ULL) | ^~~~~~~~~~~~~~~~~~~~~~~ include/uapi/linux/const.h:21:18: note: expanded from macro '_AC' 21 | #define _AC(X,Y) __AC(X,Y) | ^~~~~~~~~ include/uapi/linux/const.h:20:20: note: expanded from macro '__AC' 20 | #define __AC(X,Y) (X##Y) | ^~~~ <scratch space>:10:1: note: expanded from here 10 | 0x10000000000ULL | ^~~~~~~~~~~~~~~~ include/linux/log2.h:162:14: note: expanded from macro 'ilog2' 162 | __ilog2_u32(n) : \ | ~~~~~~~~~~~ ^ 3 warnings and 1 error generated. vim +112 arch/riscv/mm/init.c 26b8f69edda85a Alexandre Ghiti 2021-12-06 107 26b8f69edda85a Alexandre Ghiti 2021-12-06 108 #ifdef CONFIG_64BIT 26b8f69edda85a Alexandre Ghiti 2021-12-06 109 static inline void print_mlt(char *name, unsigned long b, unsigned long t) 26b8f69edda85a Alexandre Ghiti 2021-12-06 110 { 26b8f69edda85a Alexandre Ghiti 2021-12-06 111 pr_notice("%12s : 0x%08lx - 0x%08lx (%4ld TB)\n", name, b, t, 26b8f69edda85a Alexandre Ghiti 2021-12-06 @112 (((t) - (b)) >> LOG2_SZ_1T)); 26b8f69edda85a Alexandre Ghiti 2021-12-06 113 } 26b8f69edda85a Alexandre Ghiti 2021-12-06 114 #else 26b8f69edda85a Alexandre Ghiti 2021-12-06 115 #define print_mlt(n, b, t) do {} while (0) 26b8f69edda85a Alexandre Ghiti 2021-12-06 116 #endif 26b8f69edda85a Alexandre Ghiti 2021-12-06 117 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki