public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Quinn Tran <qutran@marvell.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Himanshu Madhani <himanshu.madhani@oracle.com>,
	Nilesh Javali <njavali@marvell.com>
Subject: drivers/scsi/qla2xxx/qla_init.c:171:17: warning: variable 'bail' set but not used
Date: Wed, 10 Aug 2022 07:11:11 +0800	[thread overview]
Message-ID: <202208100749.O5lpvjoS-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   15205c2829ca2cbb5ece5ceaafe1171a8470e62b
commit: 63fa7f2644b4b48e1913af33092c044bf48e9321 scsi: qla2xxx: Fix imbalance vha->vref_count
date:   3 weeks ago
config: parisc-buildonly-randconfig-r002-20220810 (https://download.01.org/0day-ci/archive/20220810/202208100749.O5lpvjoS-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 12.1.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/torvalds/linux.git/commit/?id=63fa7f2644b4b48e1913af33092c044bf48e9321
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 63fa7f2644b4b48e1913af33092c044bf48e9321
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=parisc SHELL=/bin/bash drivers/scsi/qla2xxx/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   drivers/scsi/qla2xxx/qla_init.c: In function 'qla24xx_async_abort_cmd':
>> drivers/scsi/qla2xxx/qla_init.c:171:17: warning: variable 'bail' set but not used [-Wunused-but-set-variable]
     171 |         uint8_t bail;
         |                 ^~~~
   drivers/scsi/qla2xxx/qla_init.c: In function 'qla2x00_async_tm_cmd':
   drivers/scsi/qla2xxx/qla_init.c:2023:17: warning: variable 'bail' set but not used [-Wunused-but-set-variable]
    2023 |         uint8_t bail;
         |                 ^~~~


vim +/bail +171 drivers/scsi/qla2xxx/qla_init.c

   164	
   165	int qla24xx_async_abort_cmd(srb_t *cmd_sp, bool wait)
   166	{
   167		scsi_qla_host_t *vha = cmd_sp->vha;
   168		struct srb_iocb *abt_iocb;
   169		srb_t *sp;
   170		int rval = QLA_FUNCTION_FAILED;
 > 171		uint8_t bail;
   172	
   173		/* ref: INIT for ABTS command */
   174		sp = qla2xxx_get_qpair_sp(cmd_sp->vha, cmd_sp->qpair, cmd_sp->fcport,
   175					  GFP_ATOMIC);
   176		if (!sp)
   177			return QLA_MEMORY_ALLOC_FAILED;
   178	
   179		QLA_VHA_MARK_BUSY(vha, bail);
   180		abt_iocb = &sp->u.iocb_cmd;
   181		sp->type = SRB_ABT_CMD;
   182		sp->name = "abort";
   183		sp->qpair = cmd_sp->qpair;
   184		sp->cmd_sp = cmd_sp;
   185		if (wait)
   186			sp->flags = SRB_WAKEUP_ON_COMP;
   187	
   188		init_completion(&abt_iocb->u.abt.comp);
   189		/* FW can send 2 x ABTS's timeout/20s */
   190		qla2x00_init_async_sp(sp, 42, qla24xx_abort_sp_done);
   191		sp->u.iocb_cmd.timeout = qla24xx_abort_iocb_timeout;
   192	
   193		abt_iocb->u.abt.cmd_hndl = cmd_sp->handle;
   194		abt_iocb->u.abt.req_que_no = cpu_to_le16(cmd_sp->qpair->req->id);
   195	
   196		ql_dbg(ql_dbg_async, vha, 0x507c,
   197		       "Abort command issued - hdl=%x, type=%x\n", cmd_sp->handle,
   198		       cmd_sp->type);
   199	
   200		rval = qla2x00_start_sp(sp);
   201		if (rval != QLA_SUCCESS) {
   202			/* ref: INIT */
   203			kref_put(&sp->cmd_kref, qla2x00_sp_release);
   204			return rval;
   205		}
   206	
   207		if (wait) {
   208			wait_for_completion(&abt_iocb->u.abt.comp);
   209			rval = abt_iocb->u.abt.comp_status == CS_COMPLETE ?
   210				QLA_SUCCESS : QLA_ERR_FROM_FW;
   211			/* ref: INIT */
   212			kref_put(&sp->cmd_kref, qla2x00_sp_release);
   213		}
   214	
   215		return rval;
   216	}
   217	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

                 reply	other threads:[~2022-08-09 23:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202208100749.O5lpvjoS-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=himanshu.madhani@oracle.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=njavali@marvell.com \
    --cc=qutran@marvell.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox