All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Geliang Tang <geliangtang@163.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] block: Fix compiler warnings in blk-merge.c
Date: Tue, 8 Sep 2015 09:19:12 -0600	[thread overview]
Message-ID: <55EEFC70.1050202@kernel.dk> (raw)
In-Reply-To: <82bcc02d9e54f08453726d141a91ad3cf0ac2b2e.1441552898.git.geliangtang@163.com>

On 09/06/2015 09:24 AM, Geliang Tang wrote:
> Fix the following warnings:
>
>    CC      block/blk-merge.o
> In file included from block/blk-merge.c:7:0:
> block/blk-merge.c: In function ‘blk_queue_split’:
> include/linux/blkdev.h:1368:21: warning: ‘bvprv.bv_offset’ may be used
> uninitialized in this function [-Wmaybe-uninitialized]
>     ((bprv->bv_offset + bprv->bv_len) & queue_virt_boundary(q));
>                       ^
> block/blk-merge.c:70:21: note: ‘bvprv.bv_offset’ was declared here
>    struct bio_vec bv, bvprv;
>                       ^
> In file included from block/blk-merge.c:7:0:
> include/linux/blkdev.h:1368:21: warning: ‘bvprv.bv_len’ may be used
> uninitialized in this function [-Wmaybe-uninitialized]
>     ((bprv->bv_offset + bprv->bv_len) & queue_virt_boundary(q));
>                       ^
> block/blk-merge.c:70:21: note: ‘bvprv.bv_len’ was declared here
>    struct bio_vec bv, bvprv;
>                       ^
> In file included from ./arch/x86/include/asm/page.h:70:0,
>                   from ./arch/x86/include/asm/thread_info.h:11,
>                   from include/linux/thread_info.h:54,
>                   from ./arch/x86/include/asm/preempt.h:6,
>                   from include/linux/preempt.h:64,
>                   from include/linux/spinlock.h:50,
>                   from include/linux/seqlock.h:35,
>                   from include/linux/time.h:5,
>                   from include/linux/stat.h:18,
>                   from include/linux/module.h:10,
>                   from block/blk-merge.c:5:
> include/asm-generic/memory_model.h:52:52: warning: ‘bvprv.bv_page’ may
> be used uninitialized in this function [-Wmaybe-uninitialized]
>   #define __page_to_pfn(page) (unsigned long)((page) - vmemmap)
>                                                      ^
> block/blk-merge.c:70:21: note: ‘bvprv.bv_page’ was declared here
>    struct bio_vec bv, bvprv;

There's already a fix queued up for that, which doesn't require bvprv to 
be cleared to 0:

http://git.kernel.dk/cgit/linux-block/commit/?h=for-linus&id=5014c311baa2b21384321fa4a9f617a92e3e56f0

-- 
Jens Axboe


      reply	other threads:[~2015-09-08 15:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-06 15:24 [PATCH] block: Fix compiler warnings in blk-merge.c Geliang Tang
2015-09-08 15:19 ` Jens Axboe [this message]

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=55EEFC70.1050202@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=geliangtang@163.com \
    --cc=linux-kernel@vger.kernel.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.