LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [hare-scsi-devel:eh-rework.v2 33/51] drivers/scsi/bfa/bfad_im.c:371:30: warning: variable 'itnim' set but not used
@ 2021-08-17 13:53 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-08-17 13:53 UTC (permalink / raw)
  To: Hannes Reinecke; +Cc: kbuild-all, linux-kernel

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git eh-rework.v2
head:   7603e2e1f37e470064b8c865b5d6470137baa79b
commit: fa7da686b96cd50ff111019e1d05aa05c22690c6 [33/51] bfa: Do not use scsi command to signal TMF status
config: s390-allyesconfig (attached as .config)
compiler: s390-linux-gcc (GCC) 11.2.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
        # https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git/commit/?id=fa7da686b96cd50ff111019e1d05aa05c22690c6
        git remote add hare-scsi-devel https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git
        git fetch --no-tags hare-scsi-devel eh-rework.v2
        git checkout fa7da686b96cd50ff111019e1d05aa05c22690c6
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=s390 

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/bfa/bfad_im.c: In function 'bfad_im_reset_target_handler':
>> drivers/scsi/bfa/bfad_im.c:371:30: warning: variable 'itnim' set but not used [-Wunused-but-set-variable]
     371 |         struct bfad_itnim_s *itnim;
         |                              ^~~~~


vim +/itnim +371 drivers/scsi/bfa/bfad_im.c

   360	
   361	/*
   362	 * Scsi_Host template entry, resets the target and abort all commands.
   363	 */
   364	static int
   365	bfad_im_reset_target_handler(struct scsi_cmnd *cmnd)
   366	{
   367		struct scsi_target *starget = scsi_target(cmnd->device);
   368		struct fc_rport *rport = starget_to_rport(starget);
   369		struct Scsi_Host *shost = rport_to_shost(rport);
   370		struct bfad_itnim_data_s *itnim_data;
 > 371		struct bfad_itnim_s *itnim;
   372		struct bfad_im_port_s *im_port =
   373					(struct bfad_im_port_s *) shost->hostdata[0];
   374		struct bfad_s         *bfad = im_port->bfad;
   375		unsigned long   flags;
   376		u32        rc, rtn = FAILED;
   377		DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wq);
   378		enum bfi_tskim_status task_status;
   379	
   380		spin_lock_irqsave(&bfad->bfad_lock, flags);
   381		if (!rport->dd_data) {
   382			spin_unlock_irqrestore(&bfad->bfad_lock, flags);
   383			return rtn;
   384		}
   385		itnim_data = rport->dd_data;
   386		if (itnim_data->tmf_wq) {
   387			BFA_LOG(KERN_ERR, bfad, bfa_log_level,
   388				"target reset failed, TMF already active");
   389			spin_unlock_irqrestore(&bfad->bfad_lock, flags);
   390			return rtn;
   391		}
   392		itnim = itnim_data->itnim;
   393	
   394		itnim_data->tmf_wq = &wq;
   395		itnim_data->tmf_status = 0;
   396		rc = bfad_im_target_reset_send(bfad, itnim_data);
   397		if (rc == BFA_STATUS_OK) {
   398			/* wait target reset to complete */
   399			spin_unlock_irqrestore(&bfad->bfad_lock, flags);
   400			wait_event(wq, test_bit(IO_DONE_BIT, &itnim_data->tmf_status));
   401			spin_lock_irqsave(&bfad->bfad_lock, flags);
   402	
   403			task_status = itnim_data->tmf_status >> 1;
   404			if (task_status != BFI_TSKIM_STS_OK)
   405				BFA_LOG(KERN_ERR, bfad, bfa_log_level,
   406					"target reset failure,"
   407					" status: %d\n", task_status);
   408			else
   409				rtn = SUCCESS;
   410		}
   411		spin_unlock_irqrestore(&bfad->bfad_lock, flags);
   412	
   413		return rtn;
   414	}
   415	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-17 13:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-17 13:53 [hare-scsi-devel:eh-rework.v2 33/51] drivers/scsi/bfa/bfad_im.c:371:30: warning: variable 'itnim' set but not used 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).