public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Ming Lei <ming.lei@redhat.com>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>
Subject: blk-merge warning in for-5.2/block
Date: Mon, 1 Apr 2019 08:25:00 -0600	[thread overview]
Message-ID: <100ac534-cce5-47d2-d703-e81fcbaca34f@kernel.dk> (raw)

Hi Ming,

I'm getting this one when building the new set with gcc 8.3.0:


-- In file included from block/blk-merge.c:13:
block/blk-merge.c: In function ‘blk_rq_map_sg’:
block/blk.h:73:56: warning: ‘bvec.bv_offset’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  phys_addr_t addr1 = page_to_phys(vec1->bv_page) + vec1->bv_offset;
                                                    ~~~~^~~~~~~~~~~
block/blk-merge.c:530:17: note: ‘bvec.bv_offset’ was declared here
  struct bio_vec bvec, bvprv = { NULL };
                 ^~~~
In file included from block/blk-merge.c:13:
block/blk.h:76:18: warning: ‘bvec.bv_len’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  if (addr1 + vec1->bv_len != addr2)
              ~~~~^~~~~~~~
block/blk-merge.c:530:17: note: ‘bvec.bv_len’ was declared here
  struct bio_vec bvec, bvprv = { NULL };
                 ^~~~
In file included from ./arch/x86/include/asm/page.h:76,
                 from ./arch/x86/include/asm/thread_info.h:12,
                 from ./include/linux/thread_info.h:38,
                 from ./arch/x86/include/asm/preempt.h:7,
                 from ./include/linux/preempt.h:78,
                 from ./include/linux/spinlock.h:51,
                 from ./include/linux/seqlock.h:36,
                 from ./include/linux/time.h:6,
                 from ./include/linux/stat.h:19,
                 from ./include/linux/module.h:10,
                 from block/blk-merge.c:6:
./include/asm-generic/memory_model.h:55:52: warning: ‘bvec.bv_page’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 #define __page_to_pfn(page) (unsigned long)((page) - vmemmap)
                                                    ^
block/blk-merge.c:530:17: note: ‘bvec.bv_page’ was declared here
  struct bio_vec bvec, bvprv = { NULL };
                 ^~~~


Jens Axboe


             reply	other threads:[~2019-04-01 14:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-01 14:25 Jens Axboe [this message]
2019-04-02  1:02 ` blk-merge warning in for-5.2/block Ming Lei

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=100ac534-cce5-47d2-d703-e81fcbaca34f@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    /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