Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933997AbcJ0BnV convert rfc822-to-8bit (ORCPT ); Wed, 26 Oct 2016 21:43:21 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:32496 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932465AbcJ0BnT (ORCPT ); Wed, 26 Oct 2016 21:43:19 -0400 To: Arnd Bergmann Cc: "James E.J. Bottomley" , "Martin K. Petersen" , Hannes Reinecke , Jens Axboe , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] advansys: fix build warning for PCI=n From: "Martin K. Petersen" Organization: Oracle Corporation References: <20161024155207.3027347-1-arnd@arndb.de> Date: Wed, 26 Oct 2016 21:42:51 -0400 In-Reply-To: <20161024155207.3027347-1-arnd@arndb.de> (Arnd Bergmann's message of "Mon, 24 Oct 2016 17:51:55 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Source-IP: userv0021.oracle.com [156.151.31.71] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1068 Lines: 24 >>>>> "Arnd" == Arnd Bergmann writes: Arnd> The advansys probe function tries to handle both ISA and PCI Arnd> cases, each hidden in an #ifdef when unused. This leads to a Arnd> warning indicating that when PCI is disabled we could be using Arnd> uninitialized data: Arnd> drivers/scsi/advansys.c: In function ‘advansys_board_found’: Arnd> drivers/scsi/advansys.c:11036:5: error: ‘ret’ may be used Arnd> uninitialized in this function [-Werror=maybe-uninitialized] Arnd> drivers/scsi/advansys.c:10928:28: note: ‘ret’ was declared here Arnd> drivers/scsi/advansys.c:11309:8: error: ‘share_irq’ may be used Arnd> uninitialized in this function [-Werror=maybe-uninitialized] Arnd> drivers/scsi/advansys.c:10928:6: note: ‘share_irq’ was declared Arnd> here Arnd> This cannot happen in practice because the hardware in question Arnd> only exists for PCI, but changing the code to just error out here Arnd> is better for consistency and avoids the warning. Applied to 4.10/scsi-queue. -- Martin K. Petersen Oracle Linux Engineering