Linux block layer
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: "Martin K. Petersen" <martin.petersen@oracle.com>,
	Arnd Bergmann <arnd@arndb.de>
Cc: Shaun Tancheff <shaun@tancheff.com>,
	Damien Le Moal <damien.lemoal@hgst.com>,
	Hannes Reinecke <hare@suse.de>,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] block: zoned: fix harmless maybe-uninitialized warning
Date: Mon, 24 Oct 2016 20:51:36 -0600	[thread overview]
Message-ID: <804d9f6b-22fa-ded3-301e-b7b3643c72d8@kernel.dk> (raw)
In-Reply-To: <yq11sz5b5tk.fsf@sermon.lab.mkp.net>

On 10/24/2016 07:00 PM, Martin K. Petersen wrote:
>>>>>> "Arnd" == Arnd Bergmann <arnd@arndb.de> writes:
>
> Arnd> The blkdev_report_zones produces a harmless warning when
> Arnd> -Wmaybe-uninitialized is set, after gcc gets a little confused
> Arnd> about the multiple 'goto' here:
>
> Arnd> block/blk-zoned.c: In function 'blkdev_report_zones':
> Arnd> block/blk-zoned.c:188:13: error: 'nz' may be used uninitialized in
> Arnd> this function [-Werror=maybe-uninitialized]
>
> Arnd> Moving the assignment to nr_zones makes this a little simpler
> Arnd> while also avoiding the warning reliably. I'm removing the
> Arnd> extraneous initialization of 'int ret' in the same patch, as that
> Arnd> is semi-related and could cause an uninitialized use of that
> Arnd> variable to not produce a warning.
>
> Jens: Are you picking up Arnd's two fixes for the zoned code?

Yep, adding them now. Thanks Arnd.

-- 
Jens Axboe

      reply	other threads:[~2016-10-25  2:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-21 15:42 [PATCH] block: zoned: fix harmless maybe-uninitialized warning Arnd Bergmann
2016-10-21 20:46 ` Shaun Tancheff
2016-10-23 23:38 ` Damien Le Moal
2016-10-25  1:00 ` Martin K. Petersen
2016-10-25  2:51   ` 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=804d9f6b-22fa-ded3-301e-b7b3643c72d8@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=arnd@arndb.de \
    --cc=damien.lemoal@hgst.com \
    --cc=hare@suse.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=shaun@tancheff.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