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 6/51] drivers/scsi/qla1280.c:1024:6: warning: variable 'rc' is used uninitialized whenever 'if' condition is false
Date: Wed, 18 Aug 2021 03:24:17 +0800	[thread overview]
Message-ID: <202108180354.L7tkKAMe-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git eh-rework.v2
head:   7603e2e1f37e470064b8c865b5d6470137baa79b
commit: 88c5b1c5ddc2129c875bb310a20ed02e5e24e7fd [6/51] qla1280: separate out host reset function from qla1280_error_action()
config: x86_64-randconfig-a015-20210816 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 2c6448cdc2f68f8c28fd0bd9404182b81306e6e6)
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=88c5b1c5ddc2129c875bb310a20ed02e5e24e7fd
        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 88c5b1c5ddc2129c875bb310a20ed02e5e24e7fd
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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/qla1280.c:1024:6: warning: variable 'rc' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
           if (qla1280_abort_isp(ha) != 0) {       /* it's dead */
               ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/scsi/qla1280.c:1032:9: note: uninitialized use occurs here
           return rc;
                  ^~
   drivers/scsi/qla1280.c:1024:2: note: remove the 'if' if its condition is always true
           if (qla1280_abort_isp(ha) != 0) {       /* it's dead */
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/scsi/qla1280.c:1010:8: note: initialize the variable 'rc' to silence this warning
           int rc;
                 ^
                  = 0
   1 warning generated.


vim +1024 drivers/scsi/qla1280.c

  1002	
  1003	/**************************************************************************
  1004	 *   qla1280_adapter_reset
  1005	 *     Reset the specified adapter (both channels)
  1006	 **************************************************************************/
  1007	static int
  1008	qla1280_eh_adapter_reset(struct scsi_cmnd *cmd)
  1009	{
  1010		int rc;
  1011		struct Scsi_Host *shost = cmd->device->host;
  1012		struct scsi_qla_host *ha = (struct scsi_qla_host *)shost->hostdata;
  1013	
  1014		spin_lock_irq(shost->host_lock);
  1015		if (qla1280_verbose) {
  1016			printk(KERN_INFO
  1017			       "scsi(%ld): Issued ADAPTER RESET\n",
  1018			       ha->host_no);
  1019			printk(KERN_INFO "scsi(%ld): I/O processing will "
  1020			       "continue automatically\n", ha->host_no);
  1021		}
  1022		ha->flags.reset_active = 1;
  1023	
> 1024		if (qla1280_abort_isp(ha) != 0) {	/* it's dead */
  1025			rc = FAILED;
  1026		}
  1027	
  1028		ha->flags.reset_active = 0;
  1029	
  1030		spin_unlock_irq(shost->host_lock);
  1031	
  1032		return rc;
  1033	}
  1034	

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

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Hannes Reinecke <hare@suse.de>
Cc: clang-built-linux@googlegroups.com, kbuild-all@lists.01.org,
	linux-kernel@vger.kernel.org
Subject: [hare-scsi-devel:eh-rework.v2 6/51] drivers/scsi/qla1280.c:1024:6: warning: variable 'rc' is used uninitialized whenever 'if' condition is false
Date: Wed, 18 Aug 2021 03:24:17 +0800	[thread overview]
Message-ID: <202108180354.L7tkKAMe-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git eh-rework.v2
head:   7603e2e1f37e470064b8c865b5d6470137baa79b
commit: 88c5b1c5ddc2129c875bb310a20ed02e5e24e7fd [6/51] qla1280: separate out host reset function from qla1280_error_action()
config: x86_64-randconfig-a015-20210816 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 2c6448cdc2f68f8c28fd0bd9404182b81306e6e6)
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=88c5b1c5ddc2129c875bb310a20ed02e5e24e7fd
        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 88c5b1c5ddc2129c875bb310a20ed02e5e24e7fd
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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/qla1280.c:1024:6: warning: variable 'rc' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
           if (qla1280_abort_isp(ha) != 0) {       /* it's dead */
               ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/scsi/qla1280.c:1032:9: note: uninitialized use occurs here
           return rc;
                  ^~
   drivers/scsi/qla1280.c:1024:2: note: remove the 'if' if its condition is always true
           if (qla1280_abort_isp(ha) != 0) {       /* it's dead */
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/scsi/qla1280.c:1010:8: note: initialize the variable 'rc' to silence this warning
           int rc;
                 ^
                  = 0
   1 warning generated.


vim +1024 drivers/scsi/qla1280.c

  1002	
  1003	/**************************************************************************
  1004	 *   qla1280_adapter_reset
  1005	 *     Reset the specified adapter (both channels)
  1006	 **************************************************************************/
  1007	static int
  1008	qla1280_eh_adapter_reset(struct scsi_cmnd *cmd)
  1009	{
  1010		int rc;
  1011		struct Scsi_Host *shost = cmd->device->host;
  1012		struct scsi_qla_host *ha = (struct scsi_qla_host *)shost->hostdata;
  1013	
  1014		spin_lock_irq(shost->host_lock);
  1015		if (qla1280_verbose) {
  1016			printk(KERN_INFO
  1017			       "scsi(%ld): Issued ADAPTER RESET\n",
  1018			       ha->host_no);
  1019			printk(KERN_INFO "scsi(%ld): I/O processing will "
  1020			       "continue automatically\n", ha->host_no);
  1021		}
  1022		ha->flags.reset_active = 1;
  1023	
> 1024		if (qla1280_abort_isp(ha) != 0) {	/* it's dead */
  1025			rc = FAILED;
  1026		}
  1027	
  1028		ha->flags.reset_active = 0;
  1029	
  1030		spin_unlock_irq(shost->host_lock);
  1031	
  1032		return rc;
  1033	}
  1034	

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

             reply	other threads:[~2021-08-17 19:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-17 19:24 kernel test robot [this message]
2021-08-17 19:24 ` [hare-scsi-devel:eh-rework.v2 6/51] drivers/scsi/qla1280.c:1024:6: warning: variable 'rc' is used uninitialized whenever 'if' condition is false 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=202108180354.L7tkKAMe-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.