linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build warnings after merge of the block tree
@ 2013-11-26  2:29 Stephen Rothwell
  2013-11-26  3:35 ` Stephen Rothwell
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2013-11-26  2:29 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-next, linux-kernel, Kent Overstreet

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

Hi Jens,

After merging the block tree, today's linux-next build (arm
multi_v7_defconfig) produced these warnings:

block/blk-merge.c: In function 'blk_rq_map_sg':
block/blk-merge.c:133:8: warning: 'bvprv.bv_len' may be used uninitialized in this function [-Wuninitialized]
block/blk-merge.c:171:23: note: 'bvprv.bv_len' was declared here
block/blk-merge.c:133:8: warning: 'bvprv.bv_page' may be used uninitialized in this function [-Wuninitialized]
block/blk-merge.c:171:23: note: 'bvprv.bv_page' was declared here
block/blk-merge.c:133:8: warning: 'bvprv.bv_offset' may be used uninitialized in this function [-Wuninitialized]
block/blk-merge.c:171:23: note: 'bvprv.bv_offset' was declared here
block/blk-merge.c: In function 'blk_bio_map_sg':
block/blk-merge.c:133:8: warning: 'bvprv.bv_len' may be used uninitialized in this function [-Wuninitialized]
block/blk-merge.c:233:23: note: 'bvprv.bv_len' was declared here
block/blk-merge.c:133:8: warning: 'bvprv.bv_offset' may be used uninitialized in this function [-Wuninitialized]
block/blk-merge.c:233:23: note: 'bvprv.bv_offset' was declared here
block/blk-merge.c:133:8: warning: 'bvprv.bv_page' may be used uninitialized in this function [-Wuninitialized]
block/blk-merge.c:233:23: note: 'bvprv.bv_page' was declared here
block/blk-merge.c: In function 'attempt_merge':
block/blk-merge.c:108:7: warning: 'end_bv.bv_offset' may be used uninitialized in this function [-Wuninitialized]
block/blk-merge.c:89:17: note: 'end_bv.bv_offset' was declared here
block/blk-merge.c:108:7: warning: 'end_bv.bv_page' may be used uninitialized in this function [-Wuninitialized]
block/blk-merge.c:89:17: note: 'end_bv.bv_page' was declared here
block/blk-merge.c:108:7: warning: 'end_bv.bv_len' may be used uninitialized in this function [-Wuninitialized]
block/blk-merge.c:89:17: note: 'end_bv.bv_len' was declared here

arm has its own definition of BIOVEC_PHYS_MERGEABLE() if that is relevant.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: build warnings after merge of the block tree
  2013-11-26  2:29 linux-next: build warnings after merge of the block tree Stephen Rothwell
@ 2013-11-26  3:35 ` Stephen Rothwell
  2013-11-26 19:01   ` Olof Johansson
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2013-11-26  3:35 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-next, linux-kernel, Kent Overstreet

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

Hi all,

On Tue, 26 Nov 2013 13:29:46 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the block tree, today's linux-next build (arm
> multi_v7_defconfig) produced these warnings:
> 
> block/blk-merge.c: In function 'blk_rq_map_sg':
> block/blk-merge.c:133:8: warning: 'bvprv.bv_len' may be used uninitialized in this function [-Wuninitialized]
> block/blk-merge.c:171:23: note: 'bvprv.bv_len' was declared here
> block/blk-merge.c:133:8: warning: 'bvprv.bv_page' may be used uninitialized in this function [-Wuninitialized]
> block/blk-merge.c:171:23: note: 'bvprv.bv_page' was declared here
> block/blk-merge.c:133:8: warning: 'bvprv.bv_offset' may be used uninitialized in this function [-Wuninitialized]
> block/blk-merge.c:171:23: note: 'bvprv.bv_offset' was declared here
> block/blk-merge.c: In function 'blk_bio_map_sg':
> block/blk-merge.c:133:8: warning: 'bvprv.bv_len' may be used uninitialized in this function [-Wuninitialized]
> block/blk-merge.c:233:23: note: 'bvprv.bv_len' was declared here
> block/blk-merge.c:133:8: warning: 'bvprv.bv_offset' may be used uninitialized in this function [-Wuninitialized]
> block/blk-merge.c:233:23: note: 'bvprv.bv_offset' was declared here
> block/blk-merge.c:133:8: warning: 'bvprv.bv_page' may be used uninitialized in this function [-Wuninitialized]
> block/blk-merge.c:233:23: note: 'bvprv.bv_page' was declared here
> block/blk-merge.c: In function 'attempt_merge':
> block/blk-merge.c:108:7: warning: 'end_bv.bv_offset' may be used uninitialized in this function [-Wuninitialized]
> block/blk-merge.c:89:17: note: 'end_bv.bv_offset' was declared here
> block/blk-merge.c:108:7: warning: 'end_bv.bv_page' may be used uninitialized in this function [-Wuninitialized]
> block/blk-merge.c:89:17: note: 'end_bv.bv_page' was declared here
> block/blk-merge.c:108:7: warning: 'end_bv.bv_len' may be used uninitialized in this function [-Wuninitialized]
> block/blk-merge.c:89:17: note: 'end_bv.bv_len' was declared here
> 
> arm has its own definition of BIOVEC_PHYS_MERGEABLE() if that is relevant.

For an easier test case, the i386 defcongig does this as well.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: build warnings after merge of the block tree
  2013-11-26  3:35 ` Stephen Rothwell
@ 2013-11-26 19:01   ` Olof Johansson
  2013-11-26 19:02     ` Jens Axboe
  0 siblings, 1 reply; 6+ messages in thread
From: Olof Johansson @ 2013-11-26 19:01 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Jens Axboe, linux-next, linux-kernel, Kent Overstreet

On Mon, Nov 25, 2013 at 7:35 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi all,
>
> On Tue, 26 Nov 2013 13:29:46 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>>
>> After merging the block tree, today's linux-next build (arm
>> multi_v7_defconfig) produced these warnings:
>>
>> block/blk-merge.c: In function 'blk_rq_map_sg':
>> block/blk-merge.c:133:8: warning: 'bvprv.bv_len' may be used uninitialized in this function [-Wuninitialized]
>> block/blk-merge.c:171:23: note: 'bvprv.bv_len' was declared here
>> block/blk-merge.c:133:8: warning: 'bvprv.bv_page' may be used uninitialized in this function [-Wuninitialized]
>> block/blk-merge.c:171:23: note: 'bvprv.bv_page' was declared here
>> block/blk-merge.c:133:8: warning: 'bvprv.bv_offset' may be used uninitialized in this function [-Wuninitialized]
>> block/blk-merge.c:171:23: note: 'bvprv.bv_offset' was declared here
>> block/blk-merge.c: In function 'blk_bio_map_sg':
>> block/blk-merge.c:133:8: warning: 'bvprv.bv_len' may be used uninitialized in this function [-Wuninitialized]
>> block/blk-merge.c:233:23: note: 'bvprv.bv_len' was declared here
>> block/blk-merge.c:133:8: warning: 'bvprv.bv_offset' may be used uninitialized in this function [-Wuninitialized]
>> block/blk-merge.c:233:23: note: 'bvprv.bv_offset' was declared here
>> block/blk-merge.c:133:8: warning: 'bvprv.bv_page' may be used uninitialized in this function [-Wuninitialized]
>> block/blk-merge.c:233:23: note: 'bvprv.bv_page' was declared here
>> block/blk-merge.c: In function 'attempt_merge':
>> block/blk-merge.c:108:7: warning: 'end_bv.bv_offset' may be used uninitialized in this function [-Wuninitialized]
>> block/blk-merge.c:89:17: note: 'end_bv.bv_offset' was declared here
>> block/blk-merge.c:108:7: warning: 'end_bv.bv_page' may be used uninitialized in this function [-Wuninitialized]
>> block/blk-merge.c:89:17: note: 'end_bv.bv_page' was declared here
>> block/blk-merge.c:108:7: warning: 'end_bv.bv_len' may be used uninitialized in this function [-Wuninitialized]
>> block/blk-merge.c:89:17: note: 'end_bv.bv_len' was declared here
>>
>> arm has its own definition of BIOVEC_PHYS_MERGEABLE() if that is relevant.
>
> For an easier test case, the i386 defcongig does this as well.

I just noticed that i see this with gcc 4.7.0, but 4.8.1 does not warn.


-Olof

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: build warnings after merge of the block tree
  2013-11-26 19:01   ` Olof Johansson
@ 2013-11-26 19:02     ` Jens Axboe
  2013-11-27  0:39       ` [PATCH] block: Silence spurious compiler warnings Kent Overstreet
  0 siblings, 1 reply; 6+ messages in thread
From: Jens Axboe @ 2013-11-26 19:02 UTC (permalink / raw)
  To: Olof Johansson, Stephen Rothwell
  Cc: linux-next, linux-kernel, Kent Overstreet

On 11/26/2013 12:01 PM, Olof Johansson wrote:
> On Mon, Nov 25, 2013 at 7:35 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>> Hi all,
>>
>> On Tue, 26 Nov 2013 13:29:46 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>>>
>>> After merging the block tree, today's linux-next build (arm
>>> multi_v7_defconfig) produced these warnings:
>>>
>>> block/blk-merge.c: In function 'blk_rq_map_sg':
>>> block/blk-merge.c:133:8: warning: 'bvprv.bv_len' may be used uninitialized in this function [-Wuninitialized]
>>> block/blk-merge.c:171:23: note: 'bvprv.bv_len' was declared here
>>> block/blk-merge.c:133:8: warning: 'bvprv.bv_page' may be used uninitialized in this function [-Wuninitialized]
>>> block/blk-merge.c:171:23: note: 'bvprv.bv_page' was declared here
>>> block/blk-merge.c:133:8: warning: 'bvprv.bv_offset' may be used uninitialized in this function [-Wuninitialized]
>>> block/blk-merge.c:171:23: note: 'bvprv.bv_offset' was declared here
>>> block/blk-merge.c: In function 'blk_bio_map_sg':
>>> block/blk-merge.c:133:8: warning: 'bvprv.bv_len' may be used uninitialized in this function [-Wuninitialized]
>>> block/blk-merge.c:233:23: note: 'bvprv.bv_len' was declared here
>>> block/blk-merge.c:133:8: warning: 'bvprv.bv_offset' may be used uninitialized in this function [-Wuninitialized]
>>> block/blk-merge.c:233:23: note: 'bvprv.bv_offset' was declared here
>>> block/blk-merge.c:133:8: warning: 'bvprv.bv_page' may be used uninitialized in this function [-Wuninitialized]
>>> block/blk-merge.c:233:23: note: 'bvprv.bv_page' was declared here
>>> block/blk-merge.c: In function 'attempt_merge':
>>> block/blk-merge.c:108:7: warning: 'end_bv.bv_offset' may be used uninitialized in this function [-Wuninitialized]
>>> block/blk-merge.c:89:17: note: 'end_bv.bv_offset' was declared here
>>> block/blk-merge.c:108:7: warning: 'end_bv.bv_page' may be used uninitialized in this function [-Wuninitialized]
>>> block/blk-merge.c:89:17: note: 'end_bv.bv_page' was declared here
>>> block/blk-merge.c:108:7: warning: 'end_bv.bv_len' may be used uninitialized in this function [-Wuninitialized]
>>> block/blk-merge.c:89:17: note: 'end_bv.bv_len' was declared here
>>>
>>> arm has its own definition of BIOVEC_PHYS_MERGEABLE() if that is relevant.
>>
>> For an easier test case, the i386 defcongig does this as well.
> 
> I just noticed that i see this with gcc 4.7.0, but 4.8.1 does not warn.

That's good, because it's not a bug. But arguably we should shut up 4.7
as well, however...

-- 
Jens Axboe

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] block: Silence spurious compiler warnings
  2013-11-26 19:02     ` Jens Axboe
@ 2013-11-27  0:39       ` Kent Overstreet
  2013-11-28  0:50         ` Stephen Rothwell
  0 siblings, 1 reply; 6+ messages in thread
From: Kent Overstreet @ 2013-11-27  0:39 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Olof Johansson, Stephen Rothwell, linux-next, linux-kernel

>From 46e7081430f5f483906f496733a23f8e9d898879 Mon Sep 17 00:00:00 2001
From: Kent Overstreet <kmo@daterainc.com>
Date: Tue, 26 Nov 2013 16:36:49 -0800
Subject: [PATCH] block: Silence spurious compiler warnings

Signed-off-by: Kent Overstreet <kmo@daterainc.com>
---

On Tue, Nov 26, 2013 at 12:02:08PM -0700, Jens Axboe wrote:
> On 11/26/2013 12:01 PM, Olof Johansson wrote:
> > I just noticed that i see this with gcc 4.7.0, but 4.8.1 does not warn.
> 
> That's good, because it's not a bug. But arguably we should shut up 4.7
> as well, however...

Here you go:

 block/blk-merge.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/block/blk-merge.c b/block/blk-merge.c
index 05c17be..0b097f6 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -89,6 +89,8 @@ static int blk_phys_contig_segment(struct request_queue *q, struct bio *bio,
 	struct bio_vec end_bv, nxt_bv;
 	struct bvec_iter iter;
 
+	uninitialized_var(end_bv);
+
 	if (!blk_queue_cluster(q))
 		return 0;
 
@@ -173,6 +175,8 @@ int blk_rq_map_sg(struct request_queue *q, struct request *rq,
 	struct scatterlist *sg;
 	int nsegs, cluster;
 
+	uninitialized_var(bvprv);
+
 	nsegs = 0;
 	cluster = blk_queue_cluster(q);
 
@@ -235,6 +239,8 @@ int blk_bio_map_sg(struct request_queue *q, struct bio *bio,
 	int nsegs, cluster;
 	struct bvec_iter iter;
 
+	uninitialized_var(bvprv);
+
 	nsegs = 0;
 	cluster = blk_queue_cluster(q);
 
-- 
1.8.4.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] block: Silence spurious compiler warnings
  2013-11-27  0:39       ` [PATCH] block: Silence spurious compiler warnings Kent Overstreet
@ 2013-11-28  0:50         ` Stephen Rothwell
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2013-11-28  0:50 UTC (permalink / raw)
  To: Kent Overstreet; +Cc: Jens Axboe, Olof Johansson, linux-next, linux-kernel

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

Hi Kent,

On Tue, 26 Nov 2013 16:39:49 -0800 Kent Overstreet <kmo@daterainc.com> wrote:
>
> From 46e7081430f5f483906f496733a23f8e9d898879 Mon Sep 17 00:00:00 2001
> From: Kent Overstreet <kmo@daterainc.com>
> Date: Tue, 26 Nov 2013 16:36:49 -0800
> Subject: [PATCH] block: Silence spurious compiler warnings
> 
> Signed-off-by: Kent Overstreet <kmo@daterainc.com>

Unfortunately, that did not work :-(

I am till getting these warnings into today's linux-next after merging
the block tree (arm multi_v7_defconfig, gcc 4.6):

block/blk-merge.c: In function 'blk_rq_map_sg':
block/blk-merge.c:135:8: warning: 'bvprv.bv_page' may be used uninitialized in this function [-Wuninitialized]
block/blk-merge.c:173:23: note: 'bvprv.bv_page' was declared here
block/blk-merge.c:135:8: warning: 'bvprv.bv_len' may be used uninitialized in this function [-Wuninitialized]
block/blk-merge.c:173:23: note: 'bvprv.bv_len' was declared here
block/blk-merge.c:135:8: warning: 'bvprv.bv_offset' may be used uninitialized in this function [-Wuninitialized]
block/blk-merge.c:173:23: note: 'bvprv.bv_offset' was declared here
block/blk-merge.c: In function 'blk_bio_map_sg':
block/blk-merge.c:135:8: warning: 'bvprv.bv_offset' may be used uninitialized in this function [-Wuninitialized]
block/blk-merge.c:237:23: note: 'bvprv.bv_offset' was declared here
block/blk-merge.c:135:8: warning: 'bvprv.bv_len' may be used uninitialized in this function [-Wuninitialized]
block/blk-merge.c:237:23: note: 'bvprv.bv_len' was declared here
block/blk-merge.c:135:8: warning: 'bvprv.bv_page' may be used uninitialized in this function [-Wuninitialized]
block/blk-merge.c:237:23: note: 'bvprv.bv_page' was declared here
block/blk-merge.c: In function 'attempt_merge':
block/blk-merge.c:110:7: warning: 'end_bv.bv_offset' may be used uninitialized in this function [-Wuninitialized]
block/blk-merge.c:89:17: note: 'end_bv.bv_offset' was declared here
block/blk-merge.c:110:7: warning: 'end_bv.bv_len' may be used uninitialized in this function [-Wuninitialized]
block/blk-merge.c:89:17: note: 'end_bv.bv_len' was declared here
block/blk-merge.c:110:7: warning: 'end_bv.bv_page' may be used uninitialized in this function [-Wuninitialized]
block/blk-merge.c:89:17: note: 'end_bv.bv_page' was declared here

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-11-28  0:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-26  2:29 linux-next: build warnings after merge of the block tree Stephen Rothwell
2013-11-26  3:35 ` Stephen Rothwell
2013-11-26 19:01   ` Olof Johansson
2013-11-26 19:02     ` Jens Axboe
2013-11-27  0:39       ` [PATCH] block: Silence spurious compiler warnings Kent Overstreet
2013-11-28  0:50         ` Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).