From: kernel test robot <lkp@intel.com>
To: Cong Wang <cong.wang@bytedance.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
linux-kernel@vger.kernel.org
Subject: [congwang:sk_data_ready 6/7] net/smc/af_smc.c:254:25: error: incompatible pointer types passing 'int (**)(struct sock *)' to parameter of type 'void (**)(struct sock *)'
Date: Fri, 3 Jun 2022 07:57:24 +0800 [thread overview]
Message-ID: <202206030727.VT50e3vR-lkp@intel.com> (raw)
tree: https://github.com/congwang/linux.git sk_data_ready
head: 9c95f9de643d020bc671ae23c5723d811d6f11f7
commit: 55e436c5d3f795345e5b0d946f98fa64540c496e [6/7] net: make ->sk_data_ready() return int
config: i386-randconfig-a013 (https://download.01.org/0day-ci/archive/20220603/202206030727.VT50e3vR-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project b364c76683f8ef241025a9556300778c07b590c2)
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
# https://github.com/congwang/linux/commit/55e436c5d3f795345e5b0d946f98fa64540c496e
git remote add congwang https://github.com/congwang/linux.git
git fetch --no-tags congwang sk_data_ready
git checkout 55e436c5d3f795345e5b0d946f98fa64540c496e
# 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=i386 SHELL=/bin/bash drivers/nvme/host/ net/smc/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/nvme/host/tcp.c:1610:20: error: incompatible function pointer types assigning to 'void (*)(struct sock *)' from 'int (*)(struct sock *)' [-Werror,-Wincompatible-function-pointer-types]
queue->data_ready = queue->sock->sk->sk_data_ready;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/nvme/host/tcp.c:1612:33: error: incompatible function pointer types assigning to 'int (*)(struct sock *)' from 'void (struct sock *)' [-Werror,-Wincompatible-function-pointer-types]
queue->sock->sk->sk_data_ready = nvme_tcp_data_ready;
^ ~~~~~~~~~~~~~~~~~~~
>> drivers/nvme/host/tcp.c:1644:26: error: incompatible function pointer types assigning to 'int (*)(struct sock *)' from 'void (*)(struct sock *)' [-Werror,-Wincompatible-function-pointer-types]
sock->sk->sk_data_ready = queue->data_ready;
^ ~~~~~~~~~~~~~~~~~
3 errors generated.
--
>> net/smc/af_smc.c:254:25: error: incompatible pointer types passing 'int (**)(struct sock *)' to parameter of type 'void (**)(struct sock *)' [-Werror,-Wincompatible-pointer-types]
smc_clcsock_restore_cb(&clcsk->sk_data_ready, &smc->clcsk_data_ready);
^~~~~~~~~~~~~~~~~~~~~
net/smc/smc.h:317:51: note: passing argument to parameter 'target_cb' here
static inline void smc_clcsock_restore_cb(void (**target_cb)(struct sock *),
^
net/smc/af_smc.c:254:48: error: incompatible pointer types passing 'int (**)(struct sock *)' to parameter of type 'void (**)(struct sock *)' [-Werror,-Wincompatible-pointer-types]
smc_clcsock_restore_cb(&clcsk->sk_data_ready, &smc->clcsk_data_ready);
^~~~~~~~~~~~~~~~~~~~~~
net/smc/smc.h:318:16: note: passing argument to parameter 'saved_cb' here
void (**saved_cb)(struct sock *))
^
net/smc/af_smc.c:828:25: error: incompatible pointer types passing 'int (**)(struct sock *)' to parameter of type 'void (**)(struct sock *)' [-Werror,-Wincompatible-pointer-types]
smc_clcsock_replace_cb(&clcsk->sk_data_ready, smc_fback_data_ready,
^~~~~~~~~~~~~~~~~~~~~
net/smc/smc.h:306:51: note: passing argument to parameter 'target_cb' here
static inline void smc_clcsock_replace_cb(void (**target_cb)(struct sock *),
^
>> net/smc/af_smc.c:828:48: error: incompatible function pointer types passing 'int (struct sock *)' to parameter of type 'void (*)(struct sock *)' [-Werror,-Wincompatible-function-pointer-types]
smc_clcsock_replace_cb(&clcsk->sk_data_ready, smc_fback_data_ready,
^~~~~~~~~~~~~~~~~~~~
net/smc/smc.h:307:15: note: passing argument to parameter 'new_cb' here
void (*new_cb)(struct sock *),
^
net/smc/af_smc.c:829:11: error: incompatible pointer types passing 'int (**)(struct sock *)' to parameter of type 'void (**)(struct sock *)' [-Werror,-Wincompatible-pointer-types]
&smc->clcsk_data_ready);
^~~~~~~~~~~~~~~~~~~~~~
net/smc/smc.h:308:16: note: passing argument to parameter 'saved_cb' here
void (**saved_cb)(struct sock *))
^
net/smc/af_smc.c:2483:25: error: incompatible pointer types passing 'int (**)(struct sock *)' to parameter of type 'void (**)(struct sock *)' [-Werror,-Wincompatible-pointer-types]
smc_clcsock_replace_cb(&smc->clcsock->sk->sk_data_ready,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/smc/smc.h:306:51: note: passing argument to parameter 'target_cb' here
static inline void smc_clcsock_replace_cb(void (**target_cb)(struct sock *),
^
net/smc/af_smc.c:2484:11: error: incompatible function pointer types passing 'int (struct sock *)' to parameter of type 'void (*)(struct sock *)' [-Werror,-Wincompatible-function-pointer-types]
smc_clcsock_data_ready, &smc->clcsk_data_ready);
^~~~~~~~~~~~~~~~~~~~~~
net/smc/smc.h:307:15: note: passing argument to parameter 'new_cb' here
void (*new_cb)(struct sock *),
^
net/smc/af_smc.c:2484:35: error: incompatible pointer types passing 'int (**)(struct sock *)' to parameter of type 'void (**)(struct sock *)' [-Werror,-Wincompatible-pointer-types]
smc_clcsock_data_ready, &smc->clcsk_data_ready);
^~~~~~~~~~~~~~~~~~~~~~
net/smc/smc.h:308:16: note: passing argument to parameter 'saved_cb' here
void (**saved_cb)(struct sock *))
^
net/smc/af_smc.c:2501:26: error: incompatible pointer types passing 'int (**)(struct sock *)' to parameter of type 'void (**)(struct sock *)' [-Werror,-Wincompatible-pointer-types]
smc_clcsock_restore_cb(&smc->clcsock->sk->sk_data_ready,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/smc/smc.h:317:51: note: passing argument to parameter 'target_cb' here
static inline void smc_clcsock_restore_cb(void (**target_cb)(struct sock *),
^
net/smc/af_smc.c:2502:12: error: incompatible pointer types passing 'int (**)(struct sock *)' to parameter of type 'void (**)(struct sock *)' [-Werror,-Wincompatible-pointer-types]
&smc->clcsk_data_ready);
^~~~~~~~~~~~~~~~~~~~~~
net/smc/smc.h:318:16: note: passing argument to parameter 'saved_cb' here
void (**saved_cb)(struct sock *))
^
10 errors generated.
--
>> net/smc/smc_close.c:218:27: error: incompatible pointer types passing 'int (**)(struct sock *)' to parameter of type 'void (**)(struct sock *)' [-Werror,-Wincompatible-pointer-types]
smc_clcsock_restore_cb(&smc->clcsock->sk->sk_data_ready,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/smc/smc.h:317:51: note: passing argument to parameter 'target_cb' here
static inline void smc_clcsock_restore_cb(void (**target_cb)(struct sock *),
^
net/smc/smc_close.c:219:13: error: incompatible pointer types passing 'int (**)(struct sock *)' to parameter of type 'void (**)(struct sock *)' [-Werror,-Wincompatible-pointer-types]
&smc->clcsk_data_ready);
^~~~~~~~~~~~~~~~~~~~~~
net/smc/smc.h:318:16: note: passing argument to parameter 'saved_cb' here
void (**saved_cb)(struct sock *))
^
2 errors generated.
vim +254 net/smc/af_smc.c
aaa4d33f6da1e1 Karsten Graul 2018-03-16 245
0558226cebee25 Wen Gu 2022-04-22 246 static void smc_fback_restore_callbacks(struct smc_sock *smc)
0558226cebee25 Wen Gu 2022-04-22 247 {
0558226cebee25 Wen Gu 2022-04-22 248 struct sock *clcsk = smc->clcsock->sk;
0558226cebee25 Wen Gu 2022-04-22 249
0558226cebee25 Wen Gu 2022-04-22 250 write_lock_bh(&clcsk->sk_callback_lock);
0558226cebee25 Wen Gu 2022-04-22 251 clcsk->sk_user_data = NULL;
0558226cebee25 Wen Gu 2022-04-22 252
0558226cebee25 Wen Gu 2022-04-22 253 smc_clcsock_restore_cb(&clcsk->sk_state_change, &smc->clcsk_state_change);
0558226cebee25 Wen Gu 2022-04-22 @254 smc_clcsock_restore_cb(&clcsk->sk_data_ready, &smc->clcsk_data_ready);
0558226cebee25 Wen Gu 2022-04-22 255 smc_clcsock_restore_cb(&clcsk->sk_write_space, &smc->clcsk_write_space);
0558226cebee25 Wen Gu 2022-04-22 256 smc_clcsock_restore_cb(&clcsk->sk_error_report, &smc->clcsk_error_report);
0558226cebee25 Wen Gu 2022-04-22 257
0558226cebee25 Wen Gu 2022-04-22 258 write_unlock_bh(&clcsk->sk_callback_lock);
0558226cebee25 Wen Gu 2022-04-22 259 }
0558226cebee25 Wen Gu 2022-04-22 260
:::::: The code at line 254 was first introduced by commit
:::::: 0558226cebee256aa3f8ec0cc5a800a10bf120a6 net/smc: Fix slab-out-of-bounds issue in fallback
:::::: TO: Wen Gu <guwen@linux.alibaba.com>
:::::: CC: Jakub Kicinski <kuba@kernel.org>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
reply other threads:[~2022-06-02 23:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202206030727.VT50e3vR-lkp@intel.com \
--to=lkp@intel.com \
--cc=cong.wang@bytedance.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.