Re: [PATCH 5/5] mm: constify the pte_offset_map_ro_nolock() return value
kernel test robot <[email protected]> Fri, 24 Jul 2026 19:06:07 +0200
| Newsgroups | dev.linux.lists.oe-kbuild-all,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel,org.kvack.linux-mm |
|---|---|
| Message-ID | <[email protected]> |
Hi Pedro, kernel test robot noticed the following build warnings: [auto build test WARNING on akpm-mm/mm-everything] url: https://github.com/intel-lab-lkp/linux/commits/Pedro-Falcato/mm-constify-generic-pte_get/20260724-184321 base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything patch link: https://lore.kernel.org/r/20260724102017.141532-6-pfalcato%40suse.de patch subject: [PATCH 5/5] mm: constify the pte_offset_map_ro_nolock() return value config: s390-allnoconfig-bpf (https://download.01.org/0day-ci/archive/20260724/[email protected]/config) compiler: s390x-linux-gnu-gcc (Debian 14.2.0-19) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260724/[email protected]/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 <[email protected]> | Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ All warnings (new ones prefixed by >>): In file included from arch/s390/kernel/asm-offsets.c:12: ./include/linux/pgtable.h: In function 'ptep_get_lockless': >> ./include/linux/pgtable.h:782:25: warning: passing argument 1 of 'ptep_get' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] 782 | return ptep_get(ptep); | ^~~~ In file included from ./include/linux/pgtable.h:6: ./arch/s390/include/asm/pgtable.h:989:37: note: expected 'pte_t *' {aka 'long unsigned int *'} but argument is of type 'const pte_t *' {aka 'const long unsigned int *'} 989 | static inline pte_t ptep_get(pte_t *ptep) | ~~~~~~~^~~~ -- In file included from ./include/linux/mm.h:31, from ./arch/s390/include/asm/pgalloc.h:18, from ./arch/s390/include/asm/mmu_context.h:11, from ./arch/s390/include/asm/elf.h:173, from ./include/linux/elf.h:6, from ./include/linux/module.h:20, from net/8021q/vlan.c:20: ./include/linux/pgtable.h: In function 'ptep_get_lockless': >> ./include/linux/pgtable.h:782:25: warning: passing argument 1 of 'ptep_get' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] 782 | return ptep_get(ptep); | ^~~~ In file included from ./include/linux/pgtable.h:6: ./arch/s390/include/asm/pgtable.h:989:37: note: expected 'pte_t *' {aka 'long unsigned int *'} but argument is of type 'const pte_t *' {aka 'const long unsigned int *'} 989 | static inline pte_t ptep_get(pte_t *ptep) | ~~~~~~~^~~~ net/8021q/vlan.c: In function 'register_vlan_device': net/8021q/vlan.c:249:46: warning: '%i' directive output may be truncated writing between 1 and 4 bytes into a region of size between 0 and 15 [-Wformat-truncation=] 249 | snprintf(name, IFNAMSIZ, "%s.%i", real_dev->name, vlan_id); | ^~ net/8021q/vlan.c:249:42: note: directive argument in the range [0, 4094] 249 | snprintf(name, IFNAMSIZ, "%s.%i", real_dev->name, vlan_id); | ^~~~~~~ net/8021q/vlan.c:249:17: note: 'snprintf' output between 3 and 21 bytes into a destination of size 16 249 | snprintf(name, IFNAMSIZ, "%s.%i", real_dev->name, vlan_id); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ net/8021q/vlan.c:237:46: warning: '%.4i' directive output may be truncated writing 4 bytes into a region of size between 0 and 15 [-Wformat-truncation=] 237 | snprintf(name, IFNAMSIZ, "%s.%.4i", real_dev->name, vlan_id); | ^~~~ net/8021q/vlan.c:237:42: note: directive argument in the range [0, 4094] 237 | snprintf(name, IFNAMSIZ, "%s.%.4i", real_dev->name, vlan_id); | ^~~~~~~~~ net/8021q/vlan.c:237:17: note: 'snprintf' output between 6 and 21 bytes into a destination of size 16 237 | snprintf(name, IFNAMSIZ, "%s.%.4i", real_dev->name, vlan_id); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- In file included from ./include/linux/mm.h:31, from ./arch/s390/include/asm/pgalloc.h:18, from ./arch/s390/include/asm/mmu_context.h:11, from ./arch/s390/include/asm/elf.h:173, from ./include/linux/elf.h:6, from ./include/linux/module.h:20, from net/netfilter/ipvs/ip_vs_core.c:24: ./include/linux/pgtable.h: In function 'ptep_get_lockless': >> ./include/linux/pgtable.h:782:25: warning: passing argument 1 of 'ptep_get' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] 782 | return ptep_get(ptep); | ^~~~ In file included from ./include/linux/pgtable.h:6: ./arch/s390/include/asm/pgtable.h:989:37: note: expected 'pte_t *' {aka 'long unsigned int *'} but argument is of type 'const pte_t *' {aka 'const long unsigned int *'} 989 | static inline pte_t ptep_get(pte_t *ptep) | ~~~~~~~^~~~ net/netfilter/ipvs/ip_vs_core.c: In function 'ip_vs_in_icmp': net/netfilter/ipvs/ip_vs_core.c:1768:15: warning: variable 'outer_proto' set but not used [-Wunused-but-set-variable] 1768 | char *outer_proto = "IPIP"; | ^~~~~~~~~~~ vim +782 ./include/linux/pgtable.h 024d232ae4fcd7 Peter Zijlstra 2020-11-26 775 2a4a06da8a4b93 Peter Zijlstra 2020-11-13 776 /* 2a4a06da8a4b93 Peter Zijlstra 2020-11-13 777 * We require that the PTE can be read atomically. 2a4a06da8a4b93 Peter Zijlstra 2020-11-13 778 */ 024d232ae4fcd7 Peter Zijlstra 2020-11-26 779 #ifndef ptep_get_lockless 3cfe4c8a2f30c7 Pedro Falcato 2026-07-24 780 static inline pte_t ptep_get_lockless(const pte_t *ptep) 2a4a06da8a4b93 Peter Zijlstra 2020-11-13 781 { 2a4a06da8a4b93 Peter Zijlstra 2020-11-13 @782 return ptep_get(ptep); 2a4a06da8a4b93 Peter Zijlstra 2020-11-13 783 } 024d232ae4fcd7 Peter Zijlstra 2020-11-26 784 #endif 024d232ae4fcd7 Peter Zijlstra 2020-11-26 785 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki