Hi Jiong, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Jiong-Wang/bpf-eliminate-zero-extensions-for-sub-register-writes/20190416-191711 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master reproduce: # apt-get install sparse make ARCH=x86_64 allmodconfig make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' If you fix the issue, kindly add following tag Reported-by: kbuild test robot <lkp@xxxxxxxxx> sparse warnings: (new ones prefixed by >>) >> drivers/net/ethernet/netronome/nfp/bpf/jit.c:2654:34: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected unsigned char [usertype] dst @@ got resunsigned char [usertype] dst @@ >> drivers/net/ethernet/netronome/nfp/bpf/jit.c:2654:34: sparse: expected unsigned char [usertype] dst >> drivers/net/ethernet/netronome/nfp/bpf/jit.c:2654:34: sparse: got restricted swreg [usertype] dst drivers/net/ethernet/netronome/nfp/bpf/jit.c:2680:34: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected unsigned char [usertype] dst @@ got resunsigned char [usertype] dst @@ drivers/net/ethernet/netronome/nfp/bpf/jit.c:2680:34: sparse: expected unsigned char [usertype] dst drivers/net/ethernet/netronome/nfp/bpf/jit.c:2680:34: sparse: got restricted swreg [usertype] dst vim +2654 drivers/net/ethernet/netronome/nfp/bpf/jit.c 2627 2628 static int mem_ldx_skb(struct nfp_prog *nfp_prog, struct nfp_insn_meta *meta, 2629 u8 size) 2630 { 2631 swreg dst = reg_both(meta->insn.dst_reg * 2); 2632 2633 switch (meta->insn.off) { 2634 case offsetof(struct __sk_buff, len): 2635 if (size != FIELD_SIZEOF(struct __sk_buff, len)) 2636 return -EOPNOTSUPP; 2637 wrp_mov(nfp_prog, dst, plen_reg(nfp_prog)); 2638 break; 2639 case offsetof(struct __sk_buff, data): 2640 if (size != FIELD_SIZEOF(struct __sk_buff, data)) 2641 return -EOPNOTSUPP; 2642 wrp_mov(nfp_prog, dst, pptr_reg(nfp_prog)); 2643 break; 2644 case offsetof(struct __sk_buff, data_end): 2645 if (size != FIELD_SIZEOF(struct __sk_buff, data_end)) 2646 return -EOPNOTSUPP; 2647 emit_alu(nfp_prog, dst, 2648 plen_reg(nfp_prog), ALU_OP_ADD, pptr_reg(nfp_prog)); 2649 break; 2650 default: 2651 return -EOPNOTSUPP; 2652 } 2653 > 2654 wrp_zext(nfp_prog, meta, dst); 2655 2656 return 0; 2657 } 2658 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation