All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [ammarfaizi2-block:axboe/linux-block/perf-wip 5/17] drivers/md/bcache/util.c:256 bch_bio_map() error: uninitialized symbol 'page'.
Date: Mon, 21 Feb 2022 23:10:40 +0800	[thread overview]
Message-ID: <202202212347.2BTScWAC-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 3788 bytes --]

CC: kbuild-all(a)lists.01.org
CC: "GNU/Weeb Mailing List" <gwml@vger.gnuweeb.org>
CC: linux-kernel(a)vger.kernel.org
TO: Jens Axboe <axboe@kernel.dk>

tree:   https://github.com/ammarfaizi2/linux-block axboe/linux-block/perf-wip
head:   653193284c45da1c727d45de716d9b48b1019e66
commit: 97f573494a3c088d6e249ddccdbb238b3ea267e0 [5/17] block: add bvec_set_page() helper
:::::: branch date: 2 weeks ago
:::::: commit date: 2 weeks ago
config: arm-randconfig-m031-20220220 (https://download.01.org/0day-ci/archive/20220221/202202212347.2BTScWAC-lkp(a)intel.com/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 <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

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

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

cafe563591446c Kent Overstreet 2013-03-23  223  
c2421edf5f9151 Ming Lei        2017-12-18  224  /*
c2421edf5f9151 Ming Lei        2017-12-18  225   * Generally it isn't good to access .bi_io_vec and .bi_vcnt directly,
c2421edf5f9151 Ming Lei        2017-12-18  226   * the preferred way is bio_add_page, but in this case, bch_bio_map()
c2421edf5f9151 Ming Lei        2017-12-18  227   * supposes that the bvec table is empty, so it is safe to access
c2421edf5f9151 Ming Lei        2017-12-18  228   * .bi_vcnt & .bi_io_vec in this way even after multipage bvec is
c2421edf5f9151 Ming Lei        2017-12-18  229   * supported.
c2421edf5f9151 Ming Lei        2017-12-18  230   */
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  		}
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  }
cafe563591446c Kent Overstreet 2013-03-23  260  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild-all@lists.01.org
Subject: [ammarfaizi2-block:axboe/linux-block/perf-wip 5/17] drivers/md/bcache/util.c:256 bch_bio_map() error: uninitialized symbol 'page'.
Date: Mon, 21 Feb 2022 20:21:49 +0300	[thread overview]
Message-ID: <202202212347.2BTScWAC-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2940 bytes --]

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/202202212347.2BTScWAC-lkp(a)intel.com/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 <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

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/kbuild-all(a)lists.01.org

WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org, Jens Axboe <axboe@kernel.dk>
Cc: lkp@intel.com, kbuild-all@lists.01.org,
	GNU/Weeb Mailing List <gwml@vger.gnuweeb.org>,
	linux-kernel@vger.kernel.org
Subject: [ammarfaizi2-block:axboe/linux-block/perf-wip 5/17] drivers/md/bcache/util.c:256 bch_bio_map() error: uninitialized symbol 'page'.
Date: Mon, 21 Feb 2022 20:21:49 +0300	[thread overview]
Message-ID: <202202212347.2BTScWAC-lkp@intel.com> (raw)

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/202202212347.2BTScWAC-lkp@intel.com/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 <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

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/kbuild-all@lists.01.org


             reply	other threads:[~2022-02-21 15:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-21 15:10 kernel test robot [this message]
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
2022-02-21 17:21 ` Dan Carpenter

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=202202212347.2BTScWAC-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /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.