lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202005200359.xphPi9pV%lkp@intel.com>
Date:   Wed, 20 May 2020 03:37:02 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Javed Hasan <jhasan@...vell.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        Saurav Kashyap <skashyap@...vell.com>
Subject: drivers/scsi/bnx2fc/bnx2fc_hwi.c:1011:17: warning: variable 'dummy'
 set but not used

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@...el.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

Download attachment ".config.gz" of type "application/gzip" (40855 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ