From: kernel test robot <lkp@intel.com>
To: Bart Van Assche <bvanassche@acm.org>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
linux-kernel@vger.kernel.org
Subject: [bvanassche:scsi-move-scsi-pointer 25/45] drivers/scsi/megaraid.c:1075:9: warning: variable 'scb' is uninitialized when used here
Date: Fri, 21 Jan 2022 16:19:06 +0800 [thread overview]
Message-ID: <202201211656.z3YanySW-lkp@intel.com> (raw)
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
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [bvanassche:scsi-move-scsi-pointer 25/45] drivers/scsi/megaraid.c:1075:9: warning: variable 'scb' is uninitialized when used here
Date: Fri, 21 Jan 2022 16:19:06 +0800 [thread overview]
Message-ID: <202201211656.z3YanySW-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2317 bytes --]
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(a)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(a)lists.01.org
next reply other threads:[~2022-01-21 8:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-21 8:19 kernel test robot [this message]
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
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=202201211656.z3YanySW-lkp@intel.com \
--to=lkp@intel.com \
--cc=bvanassche@acm.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
/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.