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: 9212825 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E9AE860467 for ; Mon, 4 Jul 2016 15:04:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D899B2872C for ; Mon, 4 Jul 2016 15:04:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CC1F528735; Mon, 4 Jul 2016 15:04:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5798E2872C for ; Mon, 4 Jul 2016 15:04:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754028AbcGDPEQ (ORCPT ); Mon, 4 Jul 2016 11:04:16 -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.2883024-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:BiKhbZ1ppUeLMQLuawlu2a5DQRkcQSGi6m1GoR/5Wcs9hXly3qB oMZjiLnz2KuSEU7E/0mQNN7ubM+AXYUomj2y4ARPfIp1HUI+6Nz0QiRVSJ5EBBgxQgc0ZEV aCiKczC5MmWpGEyPF4qzAbAgKkWIkX8LJr/jcuHIscRNQq4oDWJOgH3YAawYTl04KCwCPnN tUZ/7GWu2GHUBccz5yEFw== X-UI-Out-Filterresults: notjunk:1; V01:K0:88E4bieM+qs=:hlcXwCaN3kQpzVvK1eD7Gc xzGYykeq9fVaq7/BDo2PDF/2d9nzeQRJknkR5k87ESDbg8RFpEyJ1MgKDBTmUPp/Oj7x3Q4ld eGzEjgT9Ia5Jkr3Ifn0MsPgpoNkSLVORhgrZfXyMMT759RM7Aig5GuuY9yF7eJqt4nQu4xeoH p1WPvHwFsQpHm3efj+9tMoGLoprDYXY5Aa3FGkdg2CS0aXeV0Q1i7NK/wWckQGF8BnyfUI3Iv FZ2cp13KPSrYbSJkrDgN+0IigApmiO0CDzlKO0sxwRRkFN2QZSi0oOrDeZtBAAzaQ27WGtKNd /llvB4a2fS80rctAyjreqJGwEkri0oN6gdNDtnUPDP4qIxnlq4wy7bJ3pcMteyzVevis3TtxN +dlcvLqZ4vqcgRd1Sj2WcEoaPtwaYBwQtIEn/pKqU6zIE3Pf8nT6VmGvFWkLscB0FA7Se22jY 1eMdW4BL0y5Dc8JBc85Sgp0hFjRRikOROmwBMHMOAOALFUWY8RiC5hAKyvg+m+8ZAc63q3t8L 0BojYYBmmIwHIDLe2R4HpcwAjrE7n7T7p15NCYEUFPAyB1t4flbfbvtQPOfK4izkCqrMbdIEC OEuaaWkEy/+jS3S1KNeSn/rVGuX+mFDs7zWs+Ba72+07iTBhC7ovoOR+w3FuG9IrEbgJguKh2 o5eUro65iIEsThpg5jtMN6Dk6PAl5kEqUk6XqF4C4QigzNXOWrI/UyKMXR25eeC/572k= Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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;