From patchwork Mon Jul 4 15:06:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102050 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp1594772qgy; Mon, 4 Jul 2016 08:04:18 -0700 (PDT) X-Received: by 10.66.126.179 with SMTP id mz19mr23919035pab.27.1467644658509; Mon, 04 Jul 2016 08:04:18 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ry2si4597272pab.144.2016.07.04.08.04.18; Mon, 04 Jul 2016 08:04:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754163AbcGDPER (ORCPT + 30 others); Mon, 4 Jul 2016 11:04:17 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:57647 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750900AbcGDPEP (ORCPT ); Mon, 4 Jul 2016 11:04:15 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue003) with ESMTPA (Nemesis) id 0LlrG8-1btQAO45AW-00ZOaF; Mon, 04 Jul 2016 17:04:05 +0200 From: Arnd Bergmann To: Doug Ledford Cc: Arnd Bergmann , Sean Hefty , Hal Rosenstock , Haggai Eran , Matan Barak , Yotam Kenneth , Moni Shoua , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] infiniband: shut up a maybe-uninitialized warning Date: Mon, 4 Jul 2016 17:06:26 +0200 Message-Id: <20160704150659.2883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C/572k= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/infiniband/core/cma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.0 diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index a3c9930f1f93..924ac237310b 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -1309,7 +1309,7 @@ static bool validate_net_dev(struct net_device *net_dev, static struct net_device *cma_get_net_dev(struct ib_cm_event *ib_event, const struct cma_req_info *req) { - struct sockaddr_storage listen_addr_storage, src_addr_storage; + struct sockaddr_storage listen_addr_storage = {}, src_addr_storage = {}; struct sockaddr *listen_addr = (struct sockaddr *)&listen_addr_storage, *src_addr = (struct sockaddr *)&src_addr_storage; struct net_device *net_dev;