From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1034375AbcJRSVg (ORCPT ); Tue, 18 Oct 2016 14:21:36 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:45064 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1034340AbcJRSVT (ORCPT ); Tue, 18 Oct 2016 14:21:19 -0400 Date: Tue, 18 Oct 2016 14:21:18 -0400 (EDT) Message-Id: <20161018.142118.319304612159280333.davem@davemloft.net> To: arnd@arndb.de Cc: jiri@resnulli.us, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, idosch@mellanox.com, dan.carpenter@oracle.com, netdev@vger.kernel.org Subject: Re: [PATCH 27/28] rocker: fix maybe-uninitialized warning From: David Miller In-Reply-To: <20161017221650.1902729-8-arnd@arndb.de> References: <20161017220342.1627073-1-arnd@arndb.de> <20161017221650.1902729-8-arnd@arndb.de> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-7 X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Tue, 18 Oct 2016 11:21:19 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id u9IILm6S012703 From: Arnd Bergmann Date: Tue, 18 Oct 2016 00:16:15 +0200 > In some rare configurations, we get a warning about the 'index' variable > being used without an initialization: > > drivers/net/ethernet/rocker/rocker_ofdpa.c: In function ¡ofdpa_port_fib_ipv4.isra.16.constprop¢: > drivers/net/ethernet/rocker/rocker_ofdpa.c:2425:92: warning: ¡index¢ may be used uninitialized in this function [-Wmaybe-uninitialized] > > This is a false positive, the logic is just a bit too complex for gcc > to follow here. Moving the intialization of 'index' a little further > down makes it clear to gcc that the function always returns an error > if it is not initialized. > > Signed-off-by: Arnd Bergmann Applied.