Received: by 10.223.185.116 with SMTP id b49csp1029029wrg; Fri, 23 Feb 2018 10:36:55 -0800 (PST) X-Google-Smtp-Source: AH8x226q0NLq3Nc0/OmdnLrrsQYyywuY7HI/GFzOL5V/zUurFHrniOgENPDn1vN/S+HT0hAwexlA X-Received: by 2002:a17:902:8d81:: with SMTP id v1-v6mr2530535plo.430.1519411015401; Fri, 23 Feb 2018 10:36:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519411015; cv=none; d=google.com; s=arc-20160816; b=PfWc8mpNZ6NN9ZbtDwb7j3WpqLOLHrnKr2+NquADDzrxrzX2pPze+rpSGhJC6Zrso5 SJ/dZOYdMNxZAVcu3h74jx8N6urECodNV+Vwkr6fWrVRqp1FGFexpg785QQtZwXIJKaU J4jWooXPUx4uhZNWzGtkA7t2UXaDBBHuSqDJzQz+BQrh9pImPDOfHRs7sV4LNhq4wDW5 WlrFGxQHBZul4zY3fS3Yr63YMzSi/Q9sBnpDhBuopLFxU4Z3SdgFkVjNH9PSVCgxNKkf TJ3jD+fmJX7Ar6W3CNrwL3o0MOobmcypG07SXyYl3HTzzaQZL3whVYFfFh43cET6VZun sPlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=/Bwf1TDGtB1YtuNtMTEC0nqn4FXSnd2mpV8e94wxPH8=; b=Hv/B1FGjMuznxqlvtFY4LVfMlgV9exRKwnt1zA+pqU0NHePVLeOuM8H7g15M416cxy luQzPSe6fMC9nMDb8xcDlDD9BWWU499WssIeD5sMdT4Vj/1Hj9n+oUmgV6SLbmLLKcqW 81Vf41bPD0aU4haOaeJauxYeINcG5nh+031LinVXxovcYacNaXzoBwFBVZvNsvwx+mlU CIKa+G1wR9Ihw26B+M7s0RNsaY41ZknRLL3eRAYnOvTGI52HZLSMQonf805EloZOkLCY Iu3SevYbSnL9+NvU3bRcDnbjkZhz/hMF08/fNEOGkpK52p1t4G7vmXiM6ql/Kebax6Mj 98pw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q13si1841156pgs.277.2018.02.23.10.36.41; Fri, 23 Feb 2018 10:36:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753925AbeBWSfy (ORCPT + 99 others); Fri, 23 Feb 2018 13:35:54 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:37450 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752919AbeBWSfw (ORCPT ); Fri, 23 Feb 2018 13:35:52 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 9345A12E1; Fri, 23 Feb 2018 18:35:51 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Hannes Reinecke , "Martin K. Petersen" Subject: [PATCH 4.4 068/193] scsi: advansys: fix build warning for PCI=n Date: Fri, 23 Feb 2018 19:25:01 +0100 Message-Id: <20180223170336.603617213@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170325.997716448@linuxfoundation.org> References: <20180223170325.997716448@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Arnd Bergmann commit f46e7cd36b5f2ce2bfb567e278a10ca717f85b84 upstream. The advansys probe function tries to handle both ISA and PCI cases, each hidden in an #ifdef when unused. This leads to a warning indicating that when PCI is disabled we could be using uninitialized data: drivers/scsi/advansys.c: In function advansys_board_found : drivers/scsi/advansys.c:11036:5: error: ret may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/scsi/advansys.c:10928:28: note: ret was declared here drivers/scsi/advansys.c:11309:8: error: share_irq may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/scsi/advansys.c:10928:6: note: share_irq was declared here This cannot happen in practice because the hardware in question only exists for PCI, but changing the code to just error out here is better for consistency and avoids the warning. Signed-off-by: Arnd Bergmann Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/advansys.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/scsi/advansys.c +++ b/drivers/scsi/advansys.c @@ -11030,6 +11030,9 @@ static int advansys_board_found(struct S ASC_DBG(2, "AdvInitGetConfig()\n"); ret = AdvInitGetConfig(pdev, shost) ? -ENODEV : 0; +#else + share_irq = 0; + ret = -ENODEV; #endif /* CONFIG_PCI */ }