public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Doug Ledford <dledford@redhat.com>
Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] infiniband: shut up a maybe-uninitialized warning
Date: Tue, 02 Aug 2016 22:05:17 +0200	[thread overview]
Message-ID: <5746036.amdJeiC7gv@wuerfel> (raw)
In-Reply-To: <1470159925.18081.21.camel@redhat.com>

On Tuesday, August 2, 2016 1:45:25 PM CEST Doug Ledford wrote:
> On Mon, 2016-07-04 at 17:06 +0200, Arnd Bergmann wrote:
> > The powerpc64 default configuration leads to warnings for the
> > infiniband
> > core code:
> > 
> > infiniband/core/cma.c: In function 'cma_get_net_dev':
> > infiniband/core/cma.c:1242:12: warning:
> > 'src_addr_storage.sin_addr.s_addr' may be used uninitialized in this
> > function [-Wmaybe-uninitialized]
> > 
> > The code looks correct to me, and I don't see the warnings on the
> > other architectures, so this is a dumb change to add an unneeded
> > initialization to the variables in order to shut up the warning.
> > 
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > Link: http://arm-soc.lixom.net/buildlogs/mainline/v4.7-
> > rc6/buildall.powerpc.ppc64_defconfig.log.passed
> 
> I thought about taking this, but I also looked over the code and it
> looks correct to me.  This is a semi-hot path in the connection bring
> up code, so I'm loathe to put in sizeof(struct sockaddr_storage) * 2 of
> needless memory writes.  So, I dropped this patch.  Hopefully, ppc64
> compiler will straighten its warnings out soon.

Ok, no worries. Linus just disabled the warning tree-wide for
all compilers, so it's gone from the autobuilder, and newer gcc
versions (4.9 or higher) should be fine too, even if someone
enables the warning manually or by passing W=1.

Thanks for having a look,

	Arnd

      reply	other threads:[~2016-08-02 20:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-04 15:06 [PATCH] infiniband: shut up a maybe-uninitialized warning Arnd Bergmann
2016-08-02 17:45 ` Doug Ledford
2016-08-02 20:05   ` 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=5746036.amdJeiC7gv@wuerfel \
    --to=arnd@arndb.de \
    --cc=dledford@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox