From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751862AbdB0Vfj convert rfc822-to-8bit (ORCPT ); Mon, 27 Feb 2017 16:35:39 -0500 Received: from mga05.intel.com ([192.55.52.43]:43618 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751714AbdB0Ve6 (ORCPT ); Mon, 27 Feb 2017 16:34:58 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,215,1484035200"; d="scan'208";a="1102917877" From: "Weiny, Ira" To: Arnd Bergmann , infinipath , "Doug Ledford" , "Hefty, Sean" , "Hal Rosenstock" CC: "Dalessandro, Dennis" , Leon Romanovsky , "Chegondi, Harish" , "Masahiro Yamada" , "John, Jubin" , "linux-rdma@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH] IB/qib: fix false-postive maybe-uninitialized warning Thread-Topic: [PATCH] IB/qib: fix false-postive maybe-uninitialized warning Thread-Index: AQHSkTpEpb/NFSC/8kas5g1cZNAwVaF9XIwQ Date: Mon, 27 Feb 2017 21:22:45 +0000 Message-ID: <2807E5FD2F6FDA4886F6618EAC48510E67C59B29@CRSMSX101.amr.corp.intel.com> References: <20170227204343.3575126-1-arnd@arndb.de> In-Reply-To: <20170227204343.3575126-1-arnd@arndb.de> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiODc3MTVjYmQtMThkZC00MDM5LTk4OGItYjYzZWY4Yjc3MWMzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6Ik5rWVRIc3BjSFNYYWQwcm1paHNiY3dGQzZpaFpHOWZOdmUxa3ZKSVdYWlk9In0= x-ctpclassification: CTP_IC x-originating-ip: [172.18.205.10] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > aarch64-linux-gcc-7 complains about code it doesn't fully understand: > > drivers/infiniband/hw/qib/qib_iba7322.c: In function > 'qib_7322_txchk_change': > include/asm-generic/bitops/non-atomic.h:105:35: error: 'shadow' may be used > uninitialized in this function [-Werror=maybe-uninitialized] > > The code is right, and despite trying hard, I could not come up with a version > that I liked better than just adding a fake initialization here to shut up the > warning. > > Fixes: f931551bafe1 ("IB/qib: Add new qib driver for QLogic PCIe InfiniBand > adapters") > Signed-off-by: Arnd Bergmann > --- Sounds reasonable to me. Acked-by: Ira Weiny > drivers/infiniband/hw/qib/qib_iba7322.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/infiniband/hw/qib/qib_iba7322.c > b/drivers/infiniband/hw/qib/qib_iba7322.c > index 12c4208fd701..af9f596bb68b 100644 > --- a/drivers/infiniband/hw/qib/qib_iba7322.c > +++ b/drivers/infiniband/hw/qib/qib_iba7322.c > @@ -7068,7 +7068,7 @@ static void qib_7322_txchk_change(struct > qib_devdata *dd, u32 start, > unsigned long flags; > > while (wait) { > - unsigned long shadow; > + unsigned long shadow = 0; > int cstart, previ = -1; > > /* > -- > 2.9.0