mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Dan Williams <dan.j.williams@intel.com>
Cc: Johannes Thumshirn <jthumshirn@suse.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	kbuild test robot <lkp@intel.com>
Subject: Re: [PATCH] dax: use correct dev_t value
Date: Thu, 08 Sep 2016 17:03:35 +0200	[thread overview]
Message-ID: <3073570.usRicVAIWU@wuerfel> (raw)
In-Reply-To: <CAPcyv4gfW4MdZJmueAY34D4+NzzHDrJyj1Hzg8v8fzyYphpFLw@mail.gmail.com>

On Thursday, September 8, 2016 7:56:31 AM CEST Dan Williams wrote:
> On Thu, Sep 8, 2016 at 6:53 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> > The dev_t variable in devm_create_dax_dev() is used before it's
> > first set:
> >
> > drivers/dax/dax.c: In function 'devm_create_dax_dev':
> > drivers/dax/dax.c:205:39: error: 'dev_t' may be used uninitialized in this function [-Werror=maybe-uninitialized]
> >   inode = iget5_locked(dax_superblock, hash_32(devt + DAXFS_MAGIC, 31),
> >                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > drivers/dax/dax.c:688:8: note: 'dev_t' was declared here
> >
> > This reorders the code to how it looks correct to me.
> >
> 
> Looks good to me.
> 
> Strange, I don't see this error with gcc-5.3.1, I assume 0day missed
> it for a similar reason?

No, the warning is disabled by now since 6e8d666e9253 ("Disable
"maybe-uninitialized" warning globally"), which I have reverted
locally.

You can also build with -Wmaybe-uninitialized, but that causes
many false positives if any of these options are enabled:

CONFIG_CC_OPTIMIZE_FOR_SIZE
CONFIG_PROFILE_ALL_BRANCHES
CONFIG_UBSAN_SANITIZE_ALL
CONFIG_GCOV_PROFILE_ALL

I'm still trying to come up with a way to get the warning to
be useful again without annoying Linus too much.

	Arnd

      reply	other threads:[~2016-09-08 15:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-08 13:53 Arnd Bergmann
2016-09-08 14:56 ` Dan Williams
2016-09-08 15:03   ` Arnd Bergmann [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=3073570.usRicVAIWU@wuerfel \
    --to=arnd@arndb.de \
    --cc=dan.j.williams@intel.com \
    --cc=jthumshirn@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.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

all inboxes | Powered by JetHome®