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: <202006151943.aqMN3Rms%lkp@intel.com>
Date:   Mon, 15 Jun 2020 19:41:46 +0800
From:   kernel 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

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ