tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: f477dd6eede3ecedc8963478571d99ec3bf3f762 commit: 4d460b397e28528bab4b2cea6a9337560e78b0b8 [12377/12643] mm: add p{g/4}d_leaf() in asm-generic/pgtable-nop{4/u}d.h config: loongarch-randconfig-r031-20230725 (https://download.01.org/0day-ci/archive/20240711/202407111910.kbzq5PZK-lkp@xxxxxxxxx/config) compiler: loongarch64-linux-gcc (GCC) 13.3.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240711/202407111910.kbzq5PZK-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/202407111910.kbzq5PZK-lkp@xxxxxxxxx/ All warnings (new ones prefixed by >>): In file included from include/linux/pgtable.h:6, from include/linux/mm.h:30, from arch/loongarch/kernel/asm-offsets.c:9: >> arch/loongarch/include/asm/pgtable.h:614: warning: "pud_leaf" redefined 614 | #define pud_leaf(pud) ((pud_val(pud) & _PAGE_HUGE) != 0) | In file included from arch/loongarch/include/asm/pgtable.h:18: include/asm-generic/pgtable-nopmd.h:34: note: this is the location of the previous definition 34 | #define pud_leaf pud_leaf | -- In file included from arch/loongarch/include/asm/uaccess.h:17, from include/linux/uaccess.h:11, from include/linux/sched/task.h:13, from include/linux/sched/signal.h:9, from include/linux/rcuwait.h:6, from include/linux/percpu-rwsem.h:7, from include/linux/fs.h:33, from include/linux/debugfs.h:15, from drivers/hwmon/pmbus/ibm-cffps.c:8: >> arch/loongarch/include/asm/pgtable.h:614: warning: "pud_leaf" redefined 614 | #define pud_leaf(pud) ((pud_val(pud) & _PAGE_HUGE) != 0) | In file included from arch/loongarch/include/asm/pgtable.h:18: include/asm-generic/pgtable-nopmd.h:34: note: this is the location of the previous definition 34 | #define pud_leaf pud_leaf | drivers/hwmon/pmbus/ibm-cffps.c: In function 'ibm_cffps_debugfs_read': drivers/hwmon/pmbus/ibm-cffps.c:169:60: warning: '%02X' directive output may be truncated writing between 2 and 8 bytes into a region of size 3 [-Wformat-truncation=] 169 | snprintf(&data[i * 2], 3, "%02X", rc); | ^~~~ drivers/hwmon/pmbus/ibm-cffps.c:169:59: note: directive argument in the range [0, 2147483647] 169 | snprintf(&data[i * 2], 3, "%02X", rc); | ^~~~~~ drivers/hwmon/pmbus/ibm-cffps.c:169:33: note: 'snprintf' output between 3 and 9 bytes into a destination of size 3 169 | snprintf(&data[i * 2], 3, "%02X", rc); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/hwmon/pmbus/ibm-cffps.c:180:60: warning: '%04X' directive output may be truncated writing between 4 and 8 bytes into a region of size 5 [-Wformat-truncation=] 180 | snprintf(&data[i * 4], 5, "%04X", rc); | ^~~~ drivers/hwmon/pmbus/ibm-cffps.c:180:59: note: directive argument in the range [0, 2147483647] 180 | snprintf(&data[i * 4], 5, "%04X", rc); | ^~~~~~ drivers/hwmon/pmbus/ibm-cffps.c:180:33: note: 'snprintf' output between 5 and 9 bytes into a destination of size 5 180 | snprintf(&data[i * 4], 5, "%04X", rc); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- In file included from include/linux/pgtable.h:6, from include/linux/mm.h:30, from arch/loongarch/kernel/asm-offsets.c:9: >> arch/loongarch/include/asm/pgtable.h:614: warning: "pud_leaf" redefined 614 | #define pud_leaf(pud) ((pud_val(pud) & _PAGE_HUGE) != 0) | In file included from arch/loongarch/include/asm/pgtable.h:18: include/asm-generic/pgtable-nopmd.h:34: note: this is the location of the previous definition 34 | #define pud_leaf pud_leaf | In file included from include/linux/pgtable.h:6, from include/linux/mm.h:30, from arch/loongarch/include/asm/vdso.h:10, from arch/loongarch/vdso/vgetcpu.c:6: >> arch/loongarch/include/asm/pgtable.h:614: warning: "pud_leaf" redefined 614 | #define pud_leaf(pud) ((pud_val(pud) & _PAGE_HUGE) != 0) | In file included from arch/loongarch/include/asm/pgtable.h:18: include/asm-generic/pgtable-nopmd.h:34: note: this is the location of the previous definition 34 | #define pud_leaf pud_leaf | In file included from include/linux/pgtable.h:6, from include/linux/mm.h:30, from arch/loongarch/include/asm/vdso.h:10, from arch/loongarch/include/asm/vdso/vdso.h:11, from arch/loongarch/include/asm/vdso/gettimeofday.h:13, from include/vdso/datapage.h:149, from lib/vdso/gettimeofday.c:5, from <command-line>: >> arch/loongarch/include/asm/pgtable.h:614: warning: "pud_leaf" redefined 614 | #define pud_leaf(pud) ((pud_val(pud) & _PAGE_HUGE) != 0) | In file included from arch/loongarch/include/asm/pgtable.h:18: include/asm-generic/pgtable-nopmd.h:34: note: this is the location of the previous definition 34 | #define pud_leaf pud_leaf | vim +/pud_leaf +614 arch/loongarch/include/asm/pgtable.h d4b6f1562a3c32 Huacai Chen 2022-05-31 612 303be4b33562a5 Hongchen Zhang 2023-09-06 613 #define pmd_leaf(pmd) ((pmd_val(pmd) & _PAGE_HUGE) != 0) 303be4b33562a5 Hongchen Zhang 2023-09-06 @614 #define pud_leaf(pud) ((pud_val(pud) & _PAGE_HUGE) != 0) 303be4b33562a5 Hongchen Zhang 2023-09-06 615 :::::: The code at line 614 was first introduced by commit :::::: 303be4b33562a5b689261ced1616bf16ad49efa7 LoongArch: mm: Add p?d_leaf() definitions :::::: TO: Hongchen Zhang <zhanghongchen@xxxxxxxxxxx> :::::: CC: Huacai Chen <chenhuacai@xxxxxxxxxxx> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki