drivers/scsi/cxgbi/cxgb4i/cxgb4i.c:993:44: warning: variable 'size6' set but not used

kernel test robot
2021-11-22T21:40:11Z

[-- Attachment #1: Type: text/plain, Size: 5604 bytes --]

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 136057256686de39cc3a07c2e39ef6bc43003ff6
commit: 010b430d5df556d5d232e3751ac691ba9e88c041 mptcp: MPTCP_IPV6 should depend on IPV6 instead of selecting it
date: 1 year, 1 month ago
config: i386-randconfig-a016-20211121 (attached as .config)
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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=010b430d5df556d5d232e3751ac691ba9e88c041
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 010b430d5df556d5d232e3751ac691ba9e88c041
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/scsi/cxgbi/cxgb4i/cxgb4i.c:993:44: warning: variable 'size6' set but not used [-Wunused-but-set-variable]
int t4 = is_t4(lldi->adapter_type), size, size6;
^
drivers/scsi/cxgbi/cxgb4i/cxgb4i.c:1774:21: warning: variable 'size6' set but not used [-Wunused-but-set-variable]
unsigned int size, size6;
^
2 warnings generated.

vim +/size6 +993 drivers/scsi/cxgbi/cxgb4i/cxgb4i.c

7b36b6e03b0d6c kxie@chelsio.com 2010-08-16 985
cd07f958e88250 Kees Cook 2017-08-28 986 static void csk_act_open_retry_timer(struct timer_list *t)
7b36b6e03b0d6c kxie@chelsio.com 2010-08-16 987 {
001586a737ee8c Anish Bhatt 2014-10-15 988 struct sk_buff *skb = NULL;
cd07f958e88250 Kees Cook 2017-08-28 989 struct cxgbi_sock *csk = from_timer(csk, t, retry_timer);
3bd3e8bf6250f3 Karen Xie 2013-05-29 990 struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(csk->cdev);
759a0cc5a3e1bc Anish Bhatt 2014-07-17 991 void (*send_act_open_func)(struct cxgbi_sock *, struct sk_buff *,
759a0cc5a3e1bc Anish Bhatt 2014-07-17 992 struct l2t_entry *);
759a0cc5a3e1bc Anish Bhatt 2014-07-17 @993 int t4 = is_t4(lldi->adapter_type), size, size6;
7b36b6e03b0d6c kxie@chelsio.com 2010-08-16 994
7b36b6e03b0d6c kxie@chelsio.com 2010-08-16 995 log_debug(1 << CXGBI_DBG_TOE | 1 << CXGBI_DBG_SOCK,
7b36b6e03b0d6c kxie@chelsio.com 2010-08-16 996 "csk 0x%p,%u,0x%lx,%u.\n",
7b36b6e03b0d6c kxie@chelsio.com 2010-08-16 997 csk, csk->state, csk->flags, csk->tid);
7b36b6e03b0d6c kxie@chelsio.com 2010-08-16 998
7b36b6e03b0d6c kxie@chelsio.com 2010-08-16 999 cxgbi_sock_get(csk);
7b36b6e03b0d6c kxie@chelsio.com 2010-08-16 1000 spin_lock_bh(&csk->lock);
759a0cc5a3e1bc Anish Bhatt 2014-07-17 1001
759a0cc5a3e1bc Anish Bhatt 2014-07-17 1002 if (t4) {
759a0cc5a3e1bc Anish Bhatt 2014-07-17 1003 size = sizeof(struct cpl_act_open_req);
759a0cc5a3e1bc Anish Bhatt 2014-07-17 1004 size6 = sizeof(struct cpl_act_open_req6);
759a0cc5a3e1bc Anish Bhatt 2014-07-17 1005 } else {
759a0cc5a3e1bc Anish Bhatt 2014-07-17 1006 size = sizeof(struct cpl_t5_act_open_req);
759a0cc5a3e1bc Anish Bhatt 2014-07-17 1007 size6 = sizeof(struct cpl_t5_act_open_req6);
759a0cc5a3e1bc Anish Bhatt 2014-07-17 1008 }
759a0cc5a3e1bc Anish Bhatt 2014-07-17 1009
759a0cc5a3e1bc Anish Bhatt 2014-07-17 1010 if (csk->csk_family == AF_INET) {
759a0cc5a3e1bc Anish Bhatt 2014-07-17 1011 send_act_open_func = send_act_open_req;
759a0cc5a3e1bc Anish Bhatt 2014-07-17 1012 skb = alloc_wr(size, 0, GFP_ATOMIC);
f42bb57c61fd21 Anish Bhatt 2014-10-14 1013 #if IS_ENABLED(CONFIG_IPV6)
759a0cc5a3e1bc Anish Bhatt 2014-07-17 1014 } else {
759a0cc5a3e1bc Anish Bhatt 2014-07-17 1015 send_act_open_func = send_act_open_req6;
759a0cc5a3e1bc Anish Bhatt 2014-07-17 1016 skb = alloc_wr(size6, 0, GFP_ATOMIC);
f42bb57c61fd21 Anish Bhatt 2014-10-14 1017 #endif
759a0cc5a3e1bc Anish Bhatt 2014-07-17 1018 }
759a0cc5a3e1bc Anish Bhatt 2014-07-17 1019
7b36b6e03b0d6c kxie@chelsio.com 2010-08-16 1020 if (!skb)
7b36b6e03b0d6c kxie@chelsio.com 2010-08-16 1021 cxgbi_sock_fail_act_open(csk, -ENOMEM);
7b36b6e03b0d6c kxie@chelsio.com 2010-08-16 1022 else {
7b36b6e03b0d6c kxie@chelsio.com 2010-08-16 1023 skb->sk = (struct sock *)csk;
7b36b6e03b0d6c kxie@chelsio.com 2010-08-16 1024 t4_set_arp_err_handler(skb, csk,
7b36b6e03b0d6c kxie@chelsio.com 2010-08-16 1025 cxgbi_sock_act_open_req_arp_failure);
759a0cc5a3e1bc Anish Bhatt 2014-07-17 1026 send_act_open_func(csk, skb, csk->l2t);
7b36b6e03b0d6c kxie@chelsio.com 2010-08-16 1027 }
759a0cc5a3e1bc Anish Bhatt 2014-07-17 1028
7b36b6e03b0d6c kxie@chelsio.com 2010-08-16 1029 spin_unlock_bh(&csk->lock);
7b36b6e03b0d6c kxie@chelsio.com 2010-08-16 1030 cxgbi_sock_put(csk);
759a0cc5a3e1bc Anish Bhatt 2014-07-17 1031

:::::: The code at line 993 was first introduced by commit
:::::: 759a0cc5a3e1bc2cc48fa3c0b91bdcad8b8f87d6 cxgb4i: Add ipv6 code to driver, call into libcxgbi ipv6 api

:::::: TO: Anish Bhatt <anish@chelsio.com>
:::::: CC: David S. Miller <davem@davemloft.net>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 37930 bytes --]