All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [hare-scsi-devel:eh-rework.v2 33/51] drivers/scsi/bfa/bfad_im.c:371:30: warning: variable 'itnim' set but not used
Date: Tue, 17 Aug 2021 21:53:43 +0800	[thread overview]
Message-ID: <202108172136.lNRSutvc-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 3704 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(a)lists.01.org

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

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Hannes Reinecke <hare@suse.de>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: [hare-scsi-devel:eh-rework.v2 33/51] drivers/scsi/bfa/bfad_im.c:371:30: warning: variable 'itnim' set but not used
Date: Tue, 17 Aug 2021 21:53:43 +0800	[thread overview]
Message-ID: <202108172136.lNRSutvc-lkp@intel.com> (raw)

[-- 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 --]

             reply	other threads:[~2021-08-17 13:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-17 13:53 kernel test robot [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202108172136.lNRSutvc-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.