linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* drivers/scsi/bnx2fc/bnx2fc_hwi.c:1011:17: warning: variable 'dummy' set but not used
@ 2020-05-19 19:37 kbuild test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kbuild test robot @ 2020-05-19 19:37 UTC (permalink / raw)
  To: Javed Hasan; +Cc: kbuild-all, linux-kernel, Martin K. Petersen, Saurav Kashyap

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   642b151f45dd54809ea00ecd3976a56c1ec9b53d
commit: 77331115e220925af1f52e18ac99e37a0b0c10ad scsi: bnx2fc: Process the RQE with CQE in interrupt context
date:   7 weeks ago
config: i386-randconfig-r012-20200519 (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
        git checkout 77331115e220925af1f52e18ac99e37a0b0c10ad
        # save the attached .config to linux build tree
        make ARCH=i386 

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

All warnings (new ones prefixed by >>, old ones prefixed by <<):

drivers/scsi/bnx2fc/bnx2fc_hwi.c: In function 'bnx2fc_process_unsol_compl':
drivers/scsi/bnx2fc/bnx2fc_hwi.c:638:16: warning: variable 'index' set but not used [-Wunused-but-set-variable]
int task_idx, index;
^~~~~
drivers/scsi/bnx2fc/bnx2fc_hwi.c:638:6: warning: variable 'task_idx' set but not used [-Wunused-but-set-variable]
int task_idx, index;
^~~~~~~~
drivers/scsi/bnx2fc/bnx2fc_hwi.c: In function 'bnx2fc_pending_work':
>> drivers/scsi/bnx2fc/bnx2fc_hwi.c:1011:17: warning: variable 'dummy' set but not used [-Wunused-but-set-variable]
unsigned char *dummy;
^~~~~
drivers/scsi/bnx2fc/bnx2fc_hwi.c: In function 'bnx2fc_init_seq_cleanup_task':
drivers/scsi/bnx2fc/bnx2fc_hwi.c:1513:21: warning: variable 'index' set but not used [-Wunused-but-set-variable]
int orig_task_idx, index;
^~~~~
drivers/scsi/bnx2fc/bnx2fc_hwi.c:1513:6: warning: variable 'orig_task_idx' set but not used [-Wunused-but-set-variable]
int orig_task_idx, index;
^~~~~~~~~~~~~
drivers/scsi/bnx2fc/bnx2fc_hwi.c: In function 'bnx2fc_allocate_hash_table':
drivers/scsi/bnx2fc/bnx2fc_hwi.c:2093:7: warning: variable 'hi' set but not used [-Wunused-but-set-variable]
u32 hi;
^~
drivers/scsi/bnx2fc/bnx2fc_hwi.c:2092:7: warning: variable 'lo' set but not used [-Wunused-but-set-variable]
u32 lo;
^~

vim +/dummy +1011 drivers/scsi/bnx2fc/bnx2fc_hwi.c

   996	
   997	/* Pending work request completion */
   998	static bool bnx2fc_pending_work(struct bnx2fc_rport *tgt, unsigned int wqe)
   999	{
  1000		unsigned int cpu = wqe % num_possible_cpus();
  1001		struct bnx2fc_percpu_s *fps;
  1002		struct bnx2fc_work *work;
  1003		struct fcoe_task_ctx_entry *task;
  1004		struct fcoe_task_ctx_entry *task_page;
  1005		struct fcoe_port *port = tgt->port;
  1006		struct bnx2fc_interface *interface = port->priv;
  1007		struct bnx2fc_hba *hba = interface->hba;
  1008		unsigned char *rq_data = NULL;
  1009		unsigned char rq_data_buff[BNX2FC_RQ_BUF_SZ];
  1010		int task_idx, index;
> 1011		unsigned char *dummy;
  1012		u16 xid;
  1013		u8 num_rq;
  1014		int i;
  1015	
  1016		xid = wqe & FCOE_PEND_WQ_CQE_TASK_ID;
  1017		if (xid >= hba->max_tasks) {
  1018			pr_err(PFX "ERROR:xid out of range\n");
  1019			return 0;
  1020		}
  1021	
  1022		task_idx = xid / BNX2FC_TASKS_PER_PAGE;
  1023		index = xid % BNX2FC_TASKS_PER_PAGE;
  1024		task_page = (struct fcoe_task_ctx_entry *)hba->task_ctx[task_idx];
  1025		task = &task_page[index];
  1026	
  1027		num_rq = ((task->rxwr_txrd.var_ctx.rx_flags &
  1028			   FCOE_TCE_RX_WR_TX_RD_VAR_NUM_RQ_WQE) >>
  1029			  FCOE_TCE_RX_WR_TX_RD_VAR_NUM_RQ_WQE_SHIFT);
  1030	
  1031		memset(rq_data_buff, 0, BNX2FC_RQ_BUF_SZ);
  1032	
  1033		if (!num_rq)
  1034			goto num_rq_zero;
  1035	
  1036		rq_data = bnx2fc_get_next_rqe(tgt, 1);
  1037	
  1038		if (num_rq > 1) {
  1039			/* We do not need extra sense data */
  1040			for (i = 1; i < num_rq; i++)
  1041				dummy = bnx2fc_get_next_rqe(tgt, 1);
  1042		}
  1043	
  1044		if (rq_data)
  1045			memcpy(rq_data_buff, rq_data, BNX2FC_RQ_BUF_SZ);
  1046	
  1047		/* return RQ entries */
  1048		for (i = 0; i < num_rq; i++)
  1049			bnx2fc_return_rqe(tgt, 1);
  1050	
  1051	num_rq_zero:
  1052	
  1053		fps = &per_cpu(bnx2fc_percpu, cpu);
  1054		spin_lock_bh(&fps->fp_work_lock);
  1055		if (fps->iothread) {
  1056			work = bnx2fc_alloc_work(tgt, wqe, rq_data_buff,
  1057						 num_rq, task);
  1058			if (work) {
  1059				list_add_tail(&work->list, &fps->work_list);
  1060				wake_up_process(fps->iothread);
  1061				spin_unlock_bh(&fps->fp_work_lock);
  1062				return 1;
  1063			}
  1064		}
  1065		spin_unlock_bh(&fps->fp_work_lock);
  1066		bnx2fc_process_cq_compl(tgt, wqe,
  1067					rq_data_buff, num_rq, task);
  1068	
  1069		return 1;
  1070	}
  1071	

---
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: 40855 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* drivers/scsi/bnx2fc/bnx2fc_hwi.c:1011:17: warning: variable 'dummy' set but not used
@ 2020-06-15 11:41 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-06-15 11:41 UTC (permalink / raw)
  To: Javed Hasan; +Cc: kbuild-all, linux-kernel, Martin K. Petersen, Saurav Kashyap

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

Hi Javed,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   b3a9e3b9622ae10064826dccb4f7a52bd88c7407
commit: 77331115e220925af1f52e18ac99e37a0b0c10ad scsi: bnx2fc: Process the RQE with CQE in interrupt context
date:   3 months ago
config: ia64-randconfig-r003-20200615 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
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
        git checkout 77331115e220925af1f52e18ac99e37a0b0c10ad
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64 

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 >>, old ones prefixed by <<):

In file included from arch/ia64/include/asm/pgtable.h:154,
from include/linux/mm.h:94,
from include/linux/bvec.h:13,
from include/linux/skbuff.h:17,
from drivers/scsi/bnx2fc/bnx2fc.h:21,
from drivers/scsi/bnx2fc/bnx2fc_hwi.c:16:
arch/ia64/include/asm/mmu_context.h: In function 'reload_context':
arch/ia64/include/asm/mmu_context.h:137:41: warning: variable 'old_rr4' set but not used [-Wunused-but-set-variable]
137 |  unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4;
|                                         ^~~~~~~
drivers/scsi/bnx2fc/bnx2fc_hwi.c: In function 'bnx2fc_process_unsol_compl':
drivers/scsi/bnx2fc/bnx2fc_hwi.c:638:16: warning: variable 'index' set but not used [-Wunused-but-set-variable]
638 |  int task_idx, index;
|                ^~~~~
drivers/scsi/bnx2fc/bnx2fc_hwi.c:638:6: warning: variable 'task_idx' set but not used [-Wunused-but-set-variable]
638 |  int task_idx, index;
|      ^~~~~~~~
drivers/scsi/bnx2fc/bnx2fc_hwi.c: In function 'bnx2fc_pending_work':
<<                  from drivers/scsi/bnx2fc/bnx2fc_hwi.c:16:
>> drivers/scsi/bnx2fc/bnx2fc_hwi.c:1011:17: warning: variable 'dummy' set but not used [-Wunused-but-set-variable]
1011 |  unsigned char *dummy;
|                 ^~~~~
drivers/scsi/bnx2fc/bnx2fc_hwi.c: In function 'bnx2fc_init_seq_cleanup_task':
drivers/scsi/bnx2fc/bnx2fc_hwi.c:1513:21: warning: variable 'index' set but not used [-Wunused-but-set-variable]
1513 |  int orig_task_idx, index;
|                     ^~~~~
drivers/scsi/bnx2fc/bnx2fc_hwi.c:1513:6: warning: variable 'orig_task_idx' set but not used [-Wunused-but-set-variable]
1513 |  int orig_task_idx, index;
|      ^~~~~~~~~~~~~
drivers/scsi/bnx2fc/bnx2fc_hwi.c: In function 'bnx2fc_allocate_hash_table':
drivers/scsi/bnx2fc/bnx2fc_hwi.c:2093:7: warning: variable 'hi' set but not used [-Wunused-but-set-variable]
2093 |   u32 hi;
|       ^~
drivers/scsi/bnx2fc/bnx2fc_hwi.c:2092:7: warning: variable 'lo' set but not used [-Wunused-but-set-variable]
2092 |   u32 lo;
|       ^~

vim +/dummy +1011 drivers/scsi/bnx2fc/bnx2fc_hwi.c

   996	
   997	/* Pending work request completion */
   998	static bool bnx2fc_pending_work(struct bnx2fc_rport *tgt, unsigned int wqe)
   999	{
  1000		unsigned int cpu = wqe % num_possible_cpus();
  1001		struct bnx2fc_percpu_s *fps;
  1002		struct bnx2fc_work *work;
  1003		struct fcoe_task_ctx_entry *task;
  1004		struct fcoe_task_ctx_entry *task_page;
  1005		struct fcoe_port *port = tgt->port;
  1006		struct bnx2fc_interface *interface = port->priv;
  1007		struct bnx2fc_hba *hba = interface->hba;
  1008		unsigned char *rq_data = NULL;
  1009		unsigned char rq_data_buff[BNX2FC_RQ_BUF_SZ];
  1010		int task_idx, index;
> 1011		unsigned char *dummy;
  1012		u16 xid;
  1013		u8 num_rq;
  1014		int i;
  1015	
  1016		xid = wqe & FCOE_PEND_WQ_CQE_TASK_ID;
  1017		if (xid >= hba->max_tasks) {
  1018			pr_err(PFX "ERROR:xid out of range\n");
  1019			return 0;
  1020		}
  1021	
  1022		task_idx = xid / BNX2FC_TASKS_PER_PAGE;
  1023		index = xid % BNX2FC_TASKS_PER_PAGE;
  1024		task_page = (struct fcoe_task_ctx_entry *)hba->task_ctx[task_idx];
  1025		task = &task_page[index];
  1026	
  1027		num_rq = ((task->rxwr_txrd.var_ctx.rx_flags &
  1028			   FCOE_TCE_RX_WR_TX_RD_VAR_NUM_RQ_WQE) >>
  1029			  FCOE_TCE_RX_WR_TX_RD_VAR_NUM_RQ_WQE_SHIFT);
  1030	
  1031		memset(rq_data_buff, 0, BNX2FC_RQ_BUF_SZ);
  1032	
  1033		if (!num_rq)
  1034			goto num_rq_zero;
  1035	
  1036		rq_data = bnx2fc_get_next_rqe(tgt, 1);
  1037	
  1038		if (num_rq > 1) {
  1039			/* We do not need extra sense data */
  1040			for (i = 1; i < num_rq; i++)
  1041				dummy = bnx2fc_get_next_rqe(tgt, 1);
  1042		}
  1043	
  1044		if (rq_data)
  1045			memcpy(rq_data_buff, rq_data, BNX2FC_RQ_BUF_SZ);
  1046	
  1047		/* return RQ entries */
  1048		for (i = 0; i < num_rq; i++)
  1049			bnx2fc_return_rqe(tgt, 1);
  1050	
  1051	num_rq_zero:
  1052	
  1053		fps = &per_cpu(bnx2fc_percpu, cpu);
  1054		spin_lock_bh(&fps->fp_work_lock);
  1055		if (fps->iothread) {
  1056			work = bnx2fc_alloc_work(tgt, wqe, rq_data_buff,
  1057						 num_rq, task);
  1058			if (work) {
  1059				list_add_tail(&work->list, &fps->work_list);
  1060				wake_up_process(fps->iothread);
  1061				spin_unlock_bh(&fps->fp_work_lock);
  1062				return 1;
  1063			}
  1064		}
  1065		spin_unlock_bh(&fps->fp_work_lock);
  1066		bnx2fc_process_cq_compl(tgt, wqe,
  1067					rq_data_buff, num_rq, task);
  1068	
  1069		return 1;
  1070	}
  1071	

---
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: 40208 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-06-15 11:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-19 19:37 drivers/scsi/bnx2fc/bnx2fc_hwi.c:1011:17: warning: variable 'dummy' set but not used kbuild test robot
2020-06-15 11:41 kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).