From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756892AbcHBUMS (ORCPT ); Tue, 2 Aug 2016 16:12:18 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:54024 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755870AbcHBUME (ORCPT ); Tue, 2 Aug 2016 16:12:04 -0400 From: Arnd Bergmann To: Doug Ledford 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 Message-ID: <5746036.amdJeiC7gv@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-31-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <1470159925.18081.21.camel@redhat.com> References: <20160704150659.2883024-1-arnd@arndb.de> <1470159925.18081.21.camel@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:HC3GT+mXqixjDPOf9igBPUajWnzvZMhqISmdrM+FYeGe4EbMKxr IPJBtpdyH5au1Z28Ir6ny47FqhDD09HcJv9K/Z8cCZXmidqskaNSG1PlFhyN8LVTX2BNQwB Xm3jq8km7NLTJ+ydkuoZLnejtf1a8MGiG89hbm6J0OkqgdGc+dfjdeY7bcKtzP8VZpwcsoS chpOvot5bSShdR8Rjmsug== X-UI-Out-Filterresults: notjunk:1;V01:K0:MwQBSR/yVV4=:RxZnRkdQXloChQa5n/FMSP biv27fj6l0XY87x5F80K6wak+loJ3q75U2HbmxQZV16PIT/vx+FWeIAiFXOS8/5buxoYVIiyN QTBH086XoMFdQYQpyVkPa9v1hschy1p8HmZszg27hqhh1IghJYlrrz8KB5peSTk6dr8UYlovA kfkzUkDylS3sUk39UTANsyE5zu1BW8obZlfiPjOoywBpsV6/54HWwLz8Ysxx0/fT5k6GiqwG3 TIkZ/C93b0Tg+/mpxk6VvfRMLGPGY6tkQbRMkVwvGhFjStajn9HZIA1JZY0lUuejOib0wYPEz eItkynrAdfwzO8ohqh0eVtR71jqq7gPYGh9fnWji9Henr8pLHBwtv7Yi5IzHplNO8XZgBhwtW 8Q/E623KHRepTf2F7Di8KRP6zBgjY6fmBfDhff1vGEluapbslNOhD414BBBKc2MAZyEmzi5nW nt+0ye/rZI2Wre35i1W5Zt6apPAtP8Xe8Uya9LMkYMXWj6nfQzvL6MO6S0yIAj0jyW8YsfEJA UFCKTgkUXKK17ntRRRk6C5eWCZHkdcx76MerWnJ9+PtjRa3nlynrSUYhj9DJ2qPMYkukv8heD siR16ODZqrpmGUvRQz4lXeNVPLduEtFvbv75l0XkkvMnMBIb94GYM9+uSb+6cdOIFRZ6FOmZr esFmXLJmO16iFTC4azGxtTD3cWJsuq5cJHD9ZTPWHTMWAnifitRnN3Uz/8OojFHNgJComBHhh YnZ+tbYnmUv1XwWq Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > 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