From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751776AbdBHWY1 (ORCPT ); Wed, 8 Feb 2017 17:24:27 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:33553 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751320AbdBHWYZ (ORCPT ); Wed, 8 Feb 2017 17:24:25 -0500 Date: Wed, 8 Feb 2017 14:17:05 -0800 From: Brian Norris To: Marek Vasut Cc: Arnd Bergmann , David Woodhouse , Julia Lawall , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mtd: ichxrom: maybe-uninitialized with gcc-4.9 Message-ID: <20170208221705.GH94627@google.com> References: <20161024152853.2673518-1-arnd@arndb.de> <470c5483-949c-6e2a-cd52-73d99748b312@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <470c5483-949c-6e2a-cd52-73d99748b312@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 24, 2016 at 10:47:59PM +0200, Marek Vasut wrote: > On 10/24/2016 05:28 PM, Arnd Bergmann wrote: > > pci_read_config_word() might fail and not initialize its output, > > as pointed out by older versions of gcc when using the -Wmaybe-unintialized > > flag: > > > > drivers/mtd/maps/ichxrom.c: In function ‘ichxrom_cleanup’: > > drivers/mtd/maps/ichxrom.c:63:2: error: ‘word’ is used uninitialized in this function [-Werror=uninitialized] > > > > This is apparently a correct warning, though it does not show up > > with newer compilers. Changing the code to not attempt to write > > back uninitialized data into PCI config space is a correct > > fix for the problem and avoids the warning. > > > > Signed-off-by: Arnd Bergmann > > Reviewed-by: Marek Vasut Applied to l2-mtd.git