GNU/Weeb Mailing List <[email protected]>
 help / color / mirror / Atom feed
* [ammarfaizi2-block:axboe/linux-block/perf-wip 5/17] drivers/md/bcache/util.c:256 bch_bio_map() error: uninitialized symbol 'page'.
@ 2022-02-21 17:21 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2022-02-21 17:21 UTC (permalink / raw)
  To: kbuild, Jens Axboe; +Cc: lkp, kbuild-all, GNU/Weeb Mailing List, linux-kernel

tree:   https://github.com/ammarfaizi2/linux-block axboe/linux-block/perf-wip
head:   653193284c45da1c727d45de716d9b48b1019e66
commit: 97f573494a3c088d6e249ddccdbb238b3ea267e0 [5/17] block: add bvec_set_page() helper
config: arm-randconfig-m031-20220220 (https://download.01.org/0day-ci/archive/20220221/[email protected]/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>

smatch warnings:
drivers/md/bcache/util.c:256 bch_bio_map() error: uninitialized symbol 'page'.

vim +/page +256 drivers/md/bcache/util.c

169ef1cf6171d3 Kent Overstreet 2013-03-28  231  void bch_bio_map(struct bio *bio, void *base)
cafe563591446c Kent Overstreet 2013-03-23  232  {
4f024f3797c43c Kent Overstreet 2013-10-11  233  	size_t size = bio->bi_iter.bi_size;
cafe563591446c Kent Overstreet 2013-03-23  234  	struct bio_vec *bv = bio->bi_io_vec;
97f573494a3c08 Jens Axboe      2021-10-12  235  	unsigned int len, offset;
97f573494a3c08 Jens Axboe      2021-10-12  236  	struct page *page;
cafe563591446c Kent Overstreet 2013-03-23  237  
4f024f3797c43c Kent Overstreet 2013-10-11  238  	BUG_ON(!bio->bi_iter.bi_size);
cafe563591446c Kent Overstreet 2013-03-23  239  	BUG_ON(bio->bi_vcnt);
cafe563591446c Kent Overstreet 2013-03-23  240  
97f573494a3c08 Jens Axboe      2021-10-12  241  	offset = base ? offset_in_page(base) : 0;
cafe563591446c Kent Overstreet 2013-03-23  242  	goto start;
cafe563591446c Kent Overstreet 2013-03-23  243  
cafe563591446c Kent Overstreet 2013-03-23  244  	for (; size; bio->bi_vcnt++, bv++) {
97f573494a3c08 Jens Axboe      2021-10-12  245  		offset		= 0;
97f573494a3c08 Jens Axboe      2021-10-12  246  start:
97f573494a3c08 Jens Axboe      2021-10-12  247  		len		= min_t(size_t, PAGE_SIZE - offset, size);
cafe563591446c Kent Overstreet 2013-03-23  248  		if (base) {
97f573494a3c08 Jens Axboe      2021-10-12  249  			page = is_vmalloc_addr(base)
cafe563591446c Kent Overstreet 2013-03-23  250  				? vmalloc_to_page(base)
cafe563591446c Kent Overstreet 2013-03-23  251  				: virt_to_page(base);
cafe563591446c Kent Overstreet 2013-03-23  252  
97f573494a3c08 Jens Axboe      2021-10-12  253  			base += len;
cafe563591446c Kent Overstreet 2013-03-23  254  		}

No else path.

cafe563591446c Kent Overstreet 2013-03-23  255  
97f573494a3c08 Jens Axboe      2021-10-12 @256  		bvec_set_page(bv, page, len, offset);
                                                                                  ^^^^

97f573494a3c08 Jens Axboe      2021-10-12  257  		size -= len;
cafe563591446c Kent Overstreet 2013-03-23  258  	}
cafe563591446c Kent Overstreet 2013-03-23  259  }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]


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

only message in thread, other threads:[~2022-02-21 17:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-21 17:21 [ammarfaizi2-block:axboe/linux-block/perf-wip 5/17] drivers/md/bcache/util.c:256 bch_bio_map() error: uninitialized symbol 'page' Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox