* [linux-nvme:nvme-5.9-rc 14/15] drivers/nvme/host/zns.c:170 nvme_ns_report_zones() error: uninitialized symbol 'buflen'.
@ 2020-08-31 12:08 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2020-08-31 12:08 UTC (permalink / raw)
To: kbuild, Christoph Hellwig
Cc: kbuild-all, lkp, Chaitanya Kulkarni, linux-nvme, Keith Busch,
Sagi Grimberg
[-- 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-08-31 13:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-31 12:08 [linux-nvme:nvme-5.9-rc 14/15] drivers/nvme/host/zns.c:170 nvme_ns_report_zones() error: uninitialized symbol 'buflen' Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox