Hi Matthew, I love your patch! Perhaps something to improve: [auto build test WARNING on bpf-next/master] [also build test WARNING on bpf/master net/master net-next/master linus/master v6.2-rc2 next-20230105] [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/netmem-Create-new-type/20230106-054852 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master patch link: https://lore.kernel.org/r/20230105214631.3939268-3-willy%40infradead.org patch subject: [PATCH v2 02/24] netmem: Add utility functions config: arm-randconfig-r014-20230105 compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 8d9828ef5aa9688500657d36cd2aefbe12bbd162) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install arm cross compiling tool for clang build # apt-get install binutils-arm-linux-gnueabi # https://github.com/intel-lab-lkp/linux/commit/167a5c35da10f97c077af525e9f537fab4438b94 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Matthew-Wilcox-Oracle/netmem-Create-new-type/20230106-054852 git checkout 167a5c35da10f97c077af525e9f537fab4438b94 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash kernel/ net/core/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All warnings (new ones prefixed by >>): kernel/fork.c:162:13: warning: no previous prototype for function 'arch_release_task_struct' [-Wmissing-prototypes] void __weak arch_release_task_struct(struct task_struct *tsk) ^ kernel/fork.c:162:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void __weak arch_release_task_struct(struct task_struct *tsk) ^ static kernel/fork.c:862:20: warning: no previous prototype for function 'arch_task_cache_init' [-Wmissing-prototypes] void __init __weak arch_task_cache_init(void) { } ^ kernel/fork.c:862:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void __init __weak arch_task_cache_init(void) { } ^ static kernel/fork.c:957:12: warning: no previous prototype for function 'arch_dup_task_struct' [-Wmissing-prototypes] int __weak arch_dup_task_struct(struct task_struct *dst, ^ kernel/fork.c:957:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int __weak arch_dup_task_struct(struct task_struct *dst, ^ static In file included from kernel/fork.c:1087: In file included from include/linux/init_task.h:18: In file included from include/net/net_namespace.h:43: In file included from include/linux/skbuff.h:41: >> include/net/page_pool.h:111:21: warning: due to lvalue conversion of the controlling expression, association of type 'const struct netmem' will never be selected because it is qualified [-Wunreachable-code-generic-assoc] return page_to_pfn(netmem_page(nmem)); ^ include/net/page_pool.h:100:8: note: expanded from macro 'netmem_page' const struct netmem: (const struct page *)nmem, \ ^ include/net/page_pool.h:116:21: warning: due to lvalue conversion of the controlling expression, association of type 'const struct netmem' will never be selected because it is qualified [-Wunreachable-code-generic-assoc] return page_to_nid(netmem_page(nmem)); ^ include/net/page_pool.h:100:8: note: expanded from macro 'netmem_page' const struct netmem: (const struct page *)nmem, \ ^ include/net/page_pool.h:126:22: warning: due to lvalue conversion of the controlling expression, association of type 'const struct netmem' will never be selected because it is qualified [-Wunreachable-code-generic-assoc] return page_to_virt(netmem_page(nmem)); ^ include/net/page_pool.h:100:8: note: expanded from macro 'netmem_page' const struct netmem: (const struct page *)nmem, \ ^ include/net/page_pool.h:131:22: warning: due to lvalue conversion of the controlling expression, association of type 'const struct netmem' will never be selected because it is qualified [-Wunreachable-code-generic-assoc] return page_address(netmem_page(nmem)); ^ include/net/page_pool.h:100:8: note: expanded from macro 'netmem_page' const struct netmem: (const struct page *)nmem, \ ^ include/net/page_pool.h:136:24: warning: due to lvalue conversion of the controlling expression, association of type 'const struct netmem' will never be selected because it is qualified [-Wunreachable-code-generic-assoc] return page_ref_count(netmem_page(nmem)); ^ include/net/page_pool.h:100:8: note: expanded from macro 'netmem_page' const struct netmem: (const struct page *)nmem, \ ^ 8 warnings generated. -- In file included from kernel/exit.c:55: In file included from include/linux/init_task.h:18: In file included from include/net/net_namespace.h:43: In file included from include/linux/skbuff.h:41: >> include/net/page_pool.h:111:21: warning: due to lvalue conversion of the controlling expression, association of type 'const struct netmem' will never be selected because it is qualified [-Wunreachable-code-generic-assoc] return page_to_pfn(netmem_page(nmem)); ^ include/net/page_pool.h:100:8: note: expanded from macro 'netmem_page' const struct netmem: (const struct page *)nmem, \ ^ include/net/page_pool.h:116:21: warning: due to lvalue conversion of the controlling expression, association of type 'const struct netmem' will never be selected because it is qualified [-Wunreachable-code-generic-assoc] return page_to_nid(netmem_page(nmem)); ^ include/net/page_pool.h:100:8: note: expanded from macro 'netmem_page' const struct netmem: (const struct page *)nmem, \ ^ include/net/page_pool.h:126:22: warning: due to lvalue conversion of the controlling expression, association of type 'const struct netmem' will never be selected because it is qualified [-Wunreachable-code-generic-assoc] return page_to_virt(netmem_page(nmem)); ^ include/net/page_pool.h:100:8: note: expanded from macro 'netmem_page' const struct netmem: (const struct page *)nmem, \ ^ include/net/page_pool.h:131:22: warning: due to lvalue conversion of the controlling expression, association of type 'const struct netmem' will never be selected because it is qualified [-Wunreachable-code-generic-assoc] return page_address(netmem_page(nmem)); ^ include/net/page_pool.h:100:8: note: expanded from macro 'netmem_page' const struct netmem: (const struct page *)nmem, \ ^ include/net/page_pool.h:136:24: warning: due to lvalue conversion of the controlling expression, association of type 'const struct netmem' will never be selected because it is qualified [-Wunreachable-code-generic-assoc] return page_ref_count(netmem_page(nmem)); ^ include/net/page_pool.h:100:8: note: expanded from macro 'netmem_page' const struct netmem: (const struct page *)nmem, \ ^ 5 warnings generated. -- In file included from kernel/kallsyms.c:25: In file included from include/linux/filter.h:12: In file included from include/linux/skbuff.h:41: >> include/net/page_pool.h:111:21: warning: due to lvalue conversion of the controlling expression, association of type 'const struct netmem' will never be selected because it is qualified [-Wunreachable-code-generic-assoc] return page_to_pfn(netmem_page(nmem)); ^ include/net/page_pool.h:100:8: note: expanded from macro 'netmem_page' const struct netmem: (const struct page *)nmem, \ ^ include/net/page_pool.h:116:21: warning: due to lvalue conversion of the controlling expression, association of type 'const struct netmem' will never be selected because it is qualified [-Wunreachable-code-generic-assoc] return page_to_nid(netmem_page(nmem)); ^ include/net/page_pool.h:100:8: note: expanded from macro 'netmem_page' const struct netmem: (const struct page *)nmem, \ ^ include/net/page_pool.h:126:22: warning: due to lvalue conversion of the controlling expression, association of type 'const struct netmem' will never be selected because it is qualified [-Wunreachable-code-generic-assoc] return page_to_virt(netmem_page(nmem)); ^ include/net/page_pool.h:100:8: note: expanded from macro 'netmem_page' const struct netmem: (const struct page *)nmem, \ ^ include/net/page_pool.h:131:22: warning: due to lvalue conversion of the controlling expression, association of type 'const struct netmem' will never be selected because it is qualified [-Wunreachable-code-generic-assoc] return page_address(netmem_page(nmem)); ^ include/net/page_pool.h:100:8: note: expanded from macro 'netmem_page' const struct netmem: (const struct page *)nmem, \ ^ include/net/page_pool.h:136:24: warning: due to lvalue conversion of the controlling expression, association of type 'const struct netmem' will never be selected because it is qualified [-Wunreachable-code-generic-assoc] return page_ref_count(netmem_page(nmem)); ^ include/net/page_pool.h:100:8: note: expanded from macro 'netmem_page' const struct netmem: (const struct page *)nmem, \ ^ kernel/kallsyms.c:663:12: warning: no previous prototype for function 'arch_get_kallsym' [-Wmissing-prototypes] int __weak arch_get_kallsym(unsigned int symnum, unsigned long *value, ^ kernel/kallsyms.c:663:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int __weak arch_get_kallsym(unsigned int symnum, unsigned long *value, ^ static 6 warnings generated. -- In file included from net/core/flow_dissector.c:3: In file included from include/linux/skbuff.h:41: >> include/net/page_pool.h:111:21: warning: due to lvalue conversion of the controlling expression, association of type 'const struct netmem' will never be selected because it is qualified [-Wunreachable-code-generic-assoc] return page_to_pfn(netmem_page(nmem)); ^ include/net/page_pool.h:100:8: note: expanded from macro 'netmem_page' const struct netmem: (const struct page *)nmem, \ ^ include/net/page_pool.h:116:21: warning: due to lvalue conversion of the controlling expression, association of type 'const struct netmem' will never be selected because it is qualified [-Wunreachable-code-generic-assoc] return page_to_nid(netmem_page(nmem)); ^ include/net/page_pool.h:100:8: note: expanded from macro 'netmem_page' const struct netmem: (const struct page *)nmem, \ ^ include/net/page_pool.h:126:22: warning: due to lvalue conversion of the controlling expression, association of type 'const struct netmem' will never be selected because it is qualified [-Wunreachable-code-generic-assoc] return page_to_virt(netmem_page(nmem)); ^ include/net/page_pool.h:100:8: note: expanded from macro 'netmem_page' const struct netmem: (const struct page *)nmem, \ ^ include/net/page_pool.h:131:22: warning: due to lvalue conversion of the controlling expression, association of type 'const struct netmem' will never be selected because it is qualified [-Wunreachable-code-generic-assoc] return page_address(netmem_page(nmem)); ^ include/net/page_pool.h:100:8: note: expanded from macro 'netmem_page' const struct netmem: (const struct page *)nmem, \ ^ include/net/page_pool.h:136:24: warning: due to lvalue conversion of the controlling expression, association of type 'const struct netmem' will never be selected because it is qualified [-Wunreachable-code-generic-assoc] return page_ref_count(netmem_page(nmem)); ^ include/net/page_pool.h:100:8: note: expanded from macro 'netmem_page' const struct netmem: (const struct page *)nmem, \ ^ In file included from net/core/flow_dissector.c:21: In file included from include/linux/if_pppox.h:17: include/uapi/linux/if_pppox.h:71:4: warning: field sa_addr within 'struct sockaddr_pppox' is less aligned than 'union (unnamed union at include/uapi/linux/if_pppox.h:68:2)' and is usually due to 'struct sockaddr_pppox' being packed, which can lead to unaligned accesses [-Wunaligned-access] } sa_addr; ^ 6 warnings generated. -- In file included from net/core/dev.c:89: In file included from include/linux/if_ether.h:19: In file included from include/linux/skbuff.h:41: >> include/net/page_pool.h:111:21: warning: due to lvalue conversion of the controlling expression, association of type 'const struct netmem' will never be selected because it is qualified [-Wunreachable-code-generic-assoc] return page_to_pfn(netmem_page(nmem)); ^ include/net/page_pool.h:100:8: note: expanded from macro 'netmem_page' const struct netmem: (const struct page *)nmem, \ ^ include/net/page_pool.h:116:21: warning: due to lvalue conversion of the controlling expression, association of type 'const struct netmem' will never be selected because it is qualified [-Wunreachable-code-generic-assoc] return page_to_nid(netmem_page(nmem)); ^ include/net/page_pool.h:100:8: note: expanded from macro 'netmem_page' const struct netmem: (const struct page *)nmem, \ ^ include/net/page_pool.h:126:22: warning: due to lvalue conversion of the controlling expression, association of type 'const struct netmem' will never be selected because it is qualified [-Wunreachable-code-generic-assoc] return page_to_virt(netmem_page(nmem)); ^ include/net/page_pool.h:100:8: note: expanded from macro 'netmem_page' const struct netmem: (const struct page *)nmem, \ ^ include/net/page_pool.h:131:22: warning: due to lvalue conversion of the controlling expression, association of type 'const struct netmem' will never be selected because it is qualified [-Wunreachable-code-generic-assoc] return page_address(netmem_page(nmem)); ^ include/net/page_pool.h:100:8: note: expanded from macro 'netmem_page' const struct netmem: (const struct page *)nmem, \ ^ include/net/page_pool.h:136:24: warning: due to lvalue conversion of the controlling expression, association of type 'const struct netmem' will never be selected because it is qualified [-Wunreachable-code-generic-assoc] return page_ref_count(netmem_page(nmem)); ^ include/net/page_pool.h:100:8: note: expanded from macro 'netmem_page' const struct netmem: (const struct page *)nmem, \ ^ net/core/dev.c:5098:1: warning: unused function 'sch_handle_ingress' [-Wunused-function] sch_handle_ingress(struct sk_buff *skb, struct packet_type **pt_prev, int *ret, ^ net/core/dev.c:5251:19: warning: unused function 'nf_ingress' [-Wunused-function] static inline int nf_ingress(struct sk_buff *skb, struct packet_type **pt_prev, ^ 7 warnings generated. -- In file included from kernel/sched/core.c:44: In file included from include/linux/init_task.h:18: In file included from include/net/net_namespace.h:43: In file included from include/linux/skbuff.h:41: >> include/net/page_pool.h:111:21: warning: due to lvalue conversion of the controlling expression, association of type 'const struct netmem' will never be selected because it is qualified [-Wunreachable-code-generic-assoc] return page_to_pfn(netmem_page(nmem)); ^ include/net/page_pool.h:100:8: note: expanded from macro 'netmem_page' const struct netmem: (const struct page *)nmem, \ ^ include/net/page_pool.h:116:21: warning: due to lvalue conversion of the controlling expression, association of type 'const struct netmem' will never be selected because it is qualified [-Wunreachable-code-generic-assoc] return page_to_nid(netmem_page(nmem)); ^ include/net/page_pool.h:100:8: note: expanded from macro 'netmem_page' const struct netmem: (const struct page *)nmem, \ ^ include/net/page_pool.h:126:22: warning: due to lvalue conversion of the controlling expression, association of type 'const struct netmem' will never be selected because it is qualified [-Wunreachable-code-generic-assoc] return page_to_virt(netmem_page(nmem)); ^ include/net/page_pool.h:100:8: note: expanded from macro 'netmem_page' const struct netmem: (const struct page *)nmem, \ ^ include/net/page_pool.h:131:22: warning: due to lvalue conversion of the controlling expression, association of type 'const struct netmem' will never be selected because it is qualified [-Wunreachable-code-generic-assoc] return page_address(netmem_page(nmem)); ^ include/net/page_pool.h:100:8: note: expanded from macro 'netmem_page' const struct netmem: (const struct page *)nmem, \ ^ include/net/page_pool.h:136:24: warning: due to lvalue conversion of the controlling expression, association of type 'const struct netmem' will never be selected because it is qualified [-Wunreachable-code-generic-assoc] return page_ref_count(netmem_page(nmem)); ^ include/net/page_pool.h:100:8: note: expanded from macro 'netmem_page' const struct netmem: (const struct page *)nmem, \ ^ kernel/sched/core.c:6664:35: warning: no previous prototype for function 'schedule_user' [-Wmissing-prototypes] asmlinkage __visible void __sched schedule_user(void) ^ kernel/sched/core.c:6664:22: note: declare 'static' if the function is not intended to be used outside of this translation unit asmlinkage __visible void __sched schedule_user(void) ^ static kernel/sched/core.c:3579:20: warning: unused function 'rq_has_pinned_tasks' [-Wunused-function] static inline bool rq_has_pinned_tasks(struct rq *rq) ^ kernel/sched/core.c:5673:20: warning: unused function 'sched_tick_start' [-Wunused-function] static inline void sched_tick_start(int cpu) { } ^ kernel/sched/core.c:5674:20: warning: unused function 'sched_tick_stop' [-Wunused-function] static inline void sched_tick_stop(int cpu) { } ^ kernel/sched/core.c:6367:20: warning: unused function 'sched_core_cpu_starting' [-Wunused-function] static inline void sched_core_cpu_starting(unsigned int cpu) {} ^ kernel/sched/core.c:6368:20: warning: unused function 'sched_core_cpu_deactivate' [-Wunused-function] static inline void sched_core_cpu_deactivate(unsigned int cpu) {} ^ kernel/sched/core.c:6369:20: warning: unused function 'sched_core_cpu_dying' [-Wunused-function] static inline void sched_core_cpu_dying(unsigned int cpu) {} ^ 12 warnings generated. -- In file included from kernel/bpf/core.c:21: In file included from include/linux/filter.h:12: In file included from include/linux/skbuff.h:41: >> include/net/page_pool.h:111:21: warning: due to lvalue conversion of the controlling expression, association of type 'const struct netmem' will never be selected because it is qualified [-Wunreachable-code-generic-assoc] return page_to_pfn(netmem_page(nmem)); ^ include/net/page_pool.h:100:8: note: expanded from macro 'netmem_page' const struct netmem: (const struct page *)nmem, \ ^ include/net/page_pool.h:116:21: warning: due to lvalue conversion of the controlling expression, association of type 'const struct netmem' will never be selected because it is qualified [-Wunreachable-code-generic-assoc] return page_to_nid(netmem_page(nmem)); ^ include/net/page_pool.h:100:8: note: expanded from macro 'netmem_page' const struct netmem: (const struct page *)nmem, \ ^ include/net/page_pool.h:126:22: warning: due to lvalue conversion of the controlling expression, association of type 'const struct netmem' will never be selected because it is qualified [-Wunreachable-code-generic-assoc] return page_to_virt(netmem_page(nmem)); ^ include/net/page_pool.h:100:8: note: expanded from macro 'netmem_page' const struct netmem: (const struct page *)nmem, \ ^ include/net/page_pool.h:131:22: warning: due to lvalue conversion of the controlling expression, association of type 'const struct netmem' will never be selected because it is qualified [-Wunreachable-code-generic-assoc] return page_address(netmem_page(nmem)); ^ include/net/page_pool.h:100:8: note: expanded from macro 'netmem_page' const struct netmem: (const struct page *)nmem, \ ^ include/net/page_pool.h:136:24: warning: due to lvalue conversion of the controlling expression, association of type 'const struct netmem' will never be selected because it is qualified [-Wunreachable-code-generic-assoc] return page_ref_count(netmem_page(nmem)); ^ include/net/page_pool.h:100:8: note: expanded from macro 'netmem_page' const struct netmem: (const struct page *)nmem, \ ^ kernel/bpf/core.c:1630:12: warning: no previous prototype for function 'bpf_probe_read_kernel' [-Wmissing-prototypes] u64 __weak bpf_probe_read_kernel(void *dst, u32 size, const void *unsafe_ptr) ^ kernel/bpf/core.c:1630:1: note: declare 'static' if the function is not intended to be used outside of this translation unit u64 __weak bpf_probe_read_kernel(void *dst, u32 size, const void *unsafe_ptr) ^ static kernel/bpf/core.c:2069:6: warning: no previous prototype for function 'bpf_patch_call_args' [-Wmissing-prototypes] void bpf_patch_call_args(struct bpf_insn *insn, u32 stack_depth) ^ kernel/bpf/core.c:2069:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void bpf_patch_call_args(struct bpf_insn *insn, u32 stack_depth) ^ static 7 warnings generated. vim +111 include/net/page_pool.h 108 109 static inline unsigned long netmem_pfn(const struct netmem *nmem) 110 { > 111 return page_to_pfn(netmem_page(nmem)); 112 } 113 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests