llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [bvanassche:scsi-move-scsi-pointer 25/45] drivers/scsi/megaraid.c:1075:9: warning: variable 'scb' is uninitialized when used here
@ 2022-01-21  8:19 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-01-21  8:19 UTC (permalink / raw)
  To: Bart Van Assche; +Cc: llvm, kbuild-all, linux-kernel

tree:   https://github.com/bvanassche/linux scsi-move-scsi-pointer
head:   1f9cda056e9fc3b2f08455c8ab1a2d85b52df093
commit: 7f5c4ca6df22ad432a2631b6cdd374f40a249746 [25/45] megaraid: Stop using the SCSI pointer
config: i386-randconfig-a013 (https://download.01.org/0day-ci/archive/20220121/202201211656.z3YanySW-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d4baf3b1322b84816aa623d8e8cb45a49cb68b84)
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://github.com/bvanassche/linux/commit/7f5c4ca6df22ad432a2631b6cdd374f40a249746
        git remote add bvanassche https://github.com/bvanassche/linux
        git fetch --no-tags bvanassche scsi-move-scsi-pointer
        git checkout 7f5c4ca6df22ad432a2631b6cdd374f40a249746
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/scsi/

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/megaraid.c:1075:9: warning: variable 'scb' is uninitialized when used here [-Wuninitialized]
                   if (!(scb->state & SCB_ISSUED) && issue_scb(adapter, scb) != 0)
                         ^~~
   drivers/scsi/megaraid.c:1073:13: note: initialize the variable 'scb' to silence this warning
                   scb_t *scb;
                             ^
                              = NULL
   1 warning generated.


vim +/scb +1075 drivers/scsi/megaraid.c

  1065	
  1066	static void
  1067	__mega_runpendq(adapter_t *adapter)
  1068	{
  1069		struct megaraid_cmd_priv *pos, *next;
  1070	
  1071		/* Issue all pending commands to the card */
  1072		list_for_each_entry_safe(pos, next, &adapter->pending_list, entry) {
  1073			scb_t *scb;
  1074	
> 1075			if (!(scb->state & SCB_ISSUED) && issue_scb(adapter, scb) != 0)
  1076				return;
  1077		}
  1078	}
  1079	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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

only message in thread, other threads:[~2022-01-21  8:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-21  8:19 [bvanassche:scsi-move-scsi-pointer 25/45] drivers/scsi/megaraid.c:1075:9: warning: variable 'scb' is uninitialized when used here 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).