tree: https://github.com/congwang/linux.git sk_data_ready head: bb8a86d60640b8fd2c6e1aded75a6fd4fb1a12bb commit: 3ba0543ec847018a646299899181ea98fad162e2 [3/5] net: make sk->sk_data_ready() return int config: x86_64-allyesconfig compiler: gcc-11 (Debian 11.3.0-8) 11.3.0 reproduce (this is a W=1 build): # https://github.com/congwang/linux/commit/3ba0543ec847018a646299899181ea98fad162e2 git remote add congwang https://github.com/congwang/linux.git git fetch --no-tags congwang sk_data_ready git checkout 3ba0543ec847018a646299899181ea98fad162e2 # save the config file mkdir build_dir && cp config build_dir/.config make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All errors (new ones prefixed by >>): drivers/infiniband/hw/erdma/erdma_cm.c: In function 'erdma_sk_assign_cm_upcalls': >> drivers/infiniband/hw/erdma/erdma_cm.c:29:27: error: assignment to 'int (*)(struct sock *)' from incompatible pointer type 'void (*)(struct sock *)' [-Werror=incompatible-pointer-types] 29 | sk->sk_data_ready = erdma_cm_llp_data_ready; | ^ drivers/infiniband/hw/erdma/erdma_cm.c: In function 'erdma_sk_save_upcalls': >> drivers/infiniband/hw/erdma/erdma_cm.c:40:28: error: assignment to 'void (*)(struct sock *)' from incompatible pointer type 'int (*)(struct sock *)' [-Werror=incompatible-pointer-types] 40 | cep->sk_data_ready = sk->sk_data_ready; | ^ drivers/infiniband/hw/erdma/erdma_cm.c: In function 'erdma_sk_restore_upcalls': drivers/infiniband/hw/erdma/erdma_cm.c:48:27: error: assignment to 'int (*)(struct sock *)' from incompatible pointer type 'void (*)(struct sock *)' [-Werror=incompatible-pointer-types] 48 | sk->sk_data_ready = cep->sk_data_ready; | ^ cc1: some warnings being treated as errors vim +29 drivers/infiniband/hw/erdma/erdma_cm.c 920d93eac8b9777 Cheng Xu 2022-07-27 24 920d93eac8b9777 Cheng Xu 2022-07-27 25 static void erdma_sk_assign_cm_upcalls(struct sock *sk) 920d93eac8b9777 Cheng Xu 2022-07-27 26 { 920d93eac8b9777 Cheng Xu 2022-07-27 27 write_lock_bh(&sk->sk_callback_lock); 920d93eac8b9777 Cheng Xu 2022-07-27 28 sk->sk_state_change = erdma_cm_llp_state_change; 920d93eac8b9777 Cheng Xu 2022-07-27 @29 sk->sk_data_ready = erdma_cm_llp_data_ready; 920d93eac8b9777 Cheng Xu 2022-07-27 30 sk->sk_error_report = erdma_cm_llp_error_report; 920d93eac8b9777 Cheng Xu 2022-07-27 31 write_unlock_bh(&sk->sk_callback_lock); 920d93eac8b9777 Cheng Xu 2022-07-27 32 } 920d93eac8b9777 Cheng Xu 2022-07-27 33 920d93eac8b9777 Cheng Xu 2022-07-27 34 static void erdma_sk_save_upcalls(struct sock *sk) 920d93eac8b9777 Cheng Xu 2022-07-27 35 { 920d93eac8b9777 Cheng Xu 2022-07-27 36 struct erdma_cep *cep = sk_to_cep(sk); 920d93eac8b9777 Cheng Xu 2022-07-27 37 920d93eac8b9777 Cheng Xu 2022-07-27 38 write_lock_bh(&sk->sk_callback_lock); 920d93eac8b9777 Cheng Xu 2022-07-27 39 cep->sk_state_change = sk->sk_state_change; 920d93eac8b9777 Cheng Xu 2022-07-27 @40 cep->sk_data_ready = sk->sk_data_ready; 920d93eac8b9777 Cheng Xu 2022-07-27 41 cep->sk_error_report = sk->sk_error_report; 920d93eac8b9777 Cheng Xu 2022-07-27 42 write_unlock_bh(&sk->sk_callback_lock); 920d93eac8b9777 Cheng Xu 2022-07-27 43 } 920d93eac8b9777 Cheng Xu 2022-07-27 44 :::::: The code at line 29 was first introduced by commit :::::: 920d93eac8b97778fef48f34f10e58ddf870fc2a RDMA/erdma: Add connection management (CM) support :::::: TO: Cheng Xu :::::: CC: Jason Gunthorpe -- 0-DAY CI Kernel Test Service https://01.org/lkp