From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org, Christoph Hellwig <hch@lst.de>
Cc: kbuild-all@lists.01.org, lkp@intel.com,
Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>,
linux-nvme@lists.infradead.org, Keith Busch <kbusch@kernel.org>,
Sagi Grimberg <sagi@grimberg.me>
Subject: [linux-nvme:nvme-5.9-rc 14/15] drivers/nvme/host/zns.c:170 nvme_ns_report_zones() error: uninitialized symbol 'buflen'.
Date: Mon, 31 Aug 2020 15:08:30 +0300 [thread overview]
Message-ID: <20200831120830.GJ8299@kadam> (raw)
[-- Attachment #1: Type: text/plain, Size: 3049 bytes --]
tree: git://git.infradead.org/nvme.git nvme-5.9-rc
head: 82e3e51f2fb2246eee837fa4aeee79ec1f921c89
commit: cd83b396e350d2f13bd2ad81565255f77a13aa3a [14/15] nvme: fix error handling in nvme_ns_report_zones
config: x86_64-randconfig-m001-20200828 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/nvme/host/zns.c:170 nvme_ns_report_zones() error: uninitialized symbol 'buflen'.
git remote add linux-nvme git://git.infradead.org/nvme.git
git fetch --no-tags linux-nvme nvme-5.9-rc
git checkout cd83b396e350d2f13bd2ad81565255f77a13aa3a
vim +/buflen +170 drivers/nvme/host/zns.c
240e6ee272c07a2 Keith Busch 2020-06-29 159 static int nvme_ns_report_zones(struct nvme_ns *ns, sector_t sector,
240e6ee272c07a2 Keith Busch 2020-06-29 160 unsigned int nr_zones, report_zones_cb cb, void *data)
240e6ee272c07a2 Keith Busch 2020-06-29 161 {
240e6ee272c07a2 Keith Busch 2020-06-29 162 struct nvme_zone_report *report;
cd83b396e350d2f Christoph Hellwig 2020-08-25 163 struct nvme_command c = { };
240e6ee272c07a2 Keith Busch 2020-06-29 164 int ret, zone_idx = 0;
240e6ee272c07a2 Keith Busch 2020-06-29 165 unsigned int nz, i;
240e6ee272c07a2 Keith Busch 2020-06-29 166 size_t buflen;
240e6ee272c07a2 Keith Busch 2020-06-29 167
cd83b396e350d2f Christoph Hellwig 2020-08-25 168 c.zmr.opcode = nvme_cmd_zone_mgmt_recv;
cd83b396e350d2f Christoph Hellwig 2020-08-25 169 c.zmr.nsid = cpu_to_le32(ns->head->ns_id);
cd83b396e350d2f Christoph Hellwig 2020-08-25 @170 c.zmr.numd = cpu_to_le32(nvme_bytes_to_numd(buflen));
^^^^^^
Uninitialized
cd83b396e350d2f Christoph Hellwig 2020-08-25 171 c.zmr.zra = NVME_ZRA_ZONE_REPORT;
cd83b396e350d2f Christoph Hellwig 2020-08-25 172 c.zmr.zrasf = NVME_ZRASF_ZONE_REPORT_ALL;
cd83b396e350d2f Christoph Hellwig 2020-08-25 173 c.zmr.pr = NVME_REPORT_ZONE_PARTIAL;
cd83b396e350d2f Christoph Hellwig 2020-08-25 174
240e6ee272c07a2 Keith Busch 2020-06-29 175 report = nvme_zns_alloc_report_buffer(ns, nr_zones, &buflen);
^^^^^^^
until here
240e6ee272c07a2 Keith Busch 2020-06-29 176 if (!report)
240e6ee272c07a2 Keith Busch 2020-06-29 177 return -ENOMEM;
240e6ee272c07a2 Keith Busch 2020-06-29 178
240e6ee272c07a2 Keith Busch 2020-06-29 179 sector &= ~(ns->zsze - 1);
240e6ee272c07a2 Keith Busch 2020-06-29 180 while (zone_idx < nr_zones && sector < get_capacity(ns->disk)) {
240e6ee272c07a2 Keith Busch 2020-06-29 181 memset(report, 0, buflen);
---
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: 38801 bytes --]
[-- Attachment #3: Type: text/plain, Size: 158 bytes --]
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
reply other threads:[~2020-08-31 13:25 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=20200831120830.GJ8299@kadam \
--to=dan.carpenter@oracle.com \
--cc=chaitanya.kulkarni@wdc.com \
--cc=hch@lst.de \
--cc=kbuild-all@lists.01.org \
--cc=kbuild@lists.01.org \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=lkp@intel.com \
--cc=sagi@grimberg.me \
/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