Hi Chaitanya,
First bad commit (maybe != root cause):
tree:
https://github.com/sbates130272/linux-p2pmem.git nvmet_passthru_v16
head: ec432fdcdaec41c45bfedbf499b69b1bca113b6e
commit: ec432fdcdaec41c45bfedbf499b69b1bca113b6e [9/9] nvmet-passthru: Introduce NVMet
passthru Kconfig option
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
git checkout ec432fdcdaec41c45bfedbf499b69b1bca113b6e
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/nvme/target/passthru.c: In function 'nvmet_passthru_map_sg':
> drivers/nvme/target/passthru.c:186:6: warning: variable
'op_flags' set but not used [-Wunused-but-set-variable]
186 | int
op_flags = 0;
| ^~~~~~~~
vim +/op_flags +186 drivers/nvme/target/passthru.c
a3f193a3958f88 Logan Gunthorpe 2019-05-07 181
a3f193a3958f88 Logan Gunthorpe 2019-05-07 182 static int nvmet_passthru_map_sg(struct
nvmet_req *req, struct request *rq)
a3f193a3958f88 Logan Gunthorpe 2019-05-07 183 {
a3f193a3958f88 Logan Gunthorpe 2019-05-07 184 int sg_cnt = req->sg_cnt;
a3f193a3958f88 Logan Gunthorpe 2019-05-07 185 struct scatterlist *sg;
a3f193a3958f88 Logan Gunthorpe 2019-05-07 @186 int op_flags = 0;
a3f193a3958f88 Logan Gunthorpe 2019-05-07 187 struct bio *bio;
a3f193a3958f88 Logan Gunthorpe 2019-05-07 188 int i, ret;
a3f193a3958f88 Logan Gunthorpe 2019-05-07 189
a3f193a3958f88 Logan Gunthorpe 2019-05-07 190 if (req->cmd->common.opcode ==
nvme_cmd_flush)
a3f193a3958f88 Logan Gunthorpe 2019-05-07 191 op_flags = REQ_FUA;
a3f193a3958f88 Logan Gunthorpe 2019-05-07 192 else if (nvme_is_write(req->cmd))
a3f193a3958f88 Logan Gunthorpe 2019-05-07 193 op_flags = REQ_SYNC | REQ_IDLE;
a3f193a3958f88 Logan Gunthorpe 2019-05-07 194
a3f193a3958f88 Logan Gunthorpe 2019-05-07 195 bio = bio_alloc(GFP_KERNEL, min(sg_cnt,
BIO_MAX_PAGES));
a3f193a3958f88 Logan Gunthorpe 2019-05-07 196 bio->bi_end_io = bio_put;
a3f193a3958f88 Logan Gunthorpe 2019-05-07 197
a3f193a3958f88 Logan Gunthorpe 2019-05-07 198 for_each_sg(req->sg, sg,
req->sg_cnt, i) {
a3f193a3958f88 Logan Gunthorpe 2019-05-07 199 if (bio_add_pc_page(rq->q, bio,
sg_page(sg), sg->length,
a3f193a3958f88 Logan Gunthorpe 2019-05-07 200 sg->offset) < sg->length)
{
a3f193a3958f88 Logan Gunthorpe 2019-05-07 201 bio_put(bio);
a3f193a3958f88 Logan Gunthorpe 2019-05-07 202 return -EINVAL;
a3f193a3958f88 Logan Gunthorpe 2019-05-07 203 }
a3f193a3958f88 Logan Gunthorpe 2019-05-07 204 sg_cnt--;
a3f193a3958f88 Logan Gunthorpe 2019-05-07 205 }
a3f193a3958f88 Logan Gunthorpe 2019-05-07 206
a3f193a3958f88 Logan Gunthorpe 2019-05-07 207 ret = blk_rq_append_bio(rq, &bio);
a3f193a3958f88 Logan Gunthorpe 2019-05-07 208 if (unlikely(ret)) {
a3f193a3958f88 Logan Gunthorpe 2019-05-07 209 bio_put(bio);
a3f193a3958f88 Logan Gunthorpe 2019-05-07 210 return ret;
a3f193a3958f88 Logan Gunthorpe 2019-05-07 211 }
a3f193a3958f88 Logan Gunthorpe 2019-05-07 212
a3f193a3958f88 Logan Gunthorpe 2019-05-07 213 return 0;
a3f193a3958f88 Logan Gunthorpe 2019-05-07 214 }
a3f193a3958f88 Logan Gunthorpe 2019-05-07 215
:::::: The code at line 186 was first introduced by commit
:::::: a3f193a3958f880c716700f5b1e744a78dada1ff nvmet-passthru: Add passthru code to
process commands
:::::: TO: Logan Gunthorpe <logang(a)deltatee.com>
:::::: CC: Logan Gunthorpe <logang(a)deltatee.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org