Received: by 10.223.185.116 with SMTP id b49csp1095001wrg; Fri, 23 Feb 2018 11:51:09 -0800 (PST) X-Google-Smtp-Source: AH8x2251oETwtymhPsLZC77SZLZ6MIOplHzVr4RezdUxEYcPjzNQtcfB2TFFtzOX41Ln71I1QHvp X-Received: by 2002:a17:902:aa81:: with SMTP id d1-v6mr2708944plr.251.1519415468952; Fri, 23 Feb 2018 11:51:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519415468; cv=none; d=google.com; s=arc-20160816; b=T4MsSLJguZHdi2oBStFRoXkLO4zM8tNVYU0bsgpvFE24i6ZasDvaSVeTH3pM+6Od5a D1U9ZkFd9q88bwitYGsBwMPTVBzt2989pEj9l4j8jmUntSg8SQVsxqssPueKMTgRw9lY 6bmdxbFdZeC3zle8/fkSq8AfPy0O/46gUXZQQ4oI1JQsHAlQe0P6TRCmTprvd5CiiRkP +dUhZDK2VhHkM50rIsiSCaQBu57FpdPNHpLcm7O0ero/ENxHazAjbQ8nNnPpX9wtohMJ 4elnCmEkfsbg1MUdEgNpBn4gJN6fQrrTGMqMyHIQrbkTux5RWtVDyW/LBoJFit8h0q67 WylQ== 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=uCRi4JqyCVp+WEdc/JEQSK6eAkYR8mVmkJKkku2BdGg=; b=i5T5oZWzrbeKXqxLyuXoQDNLbTLB1TqNrKqP9XyOSU5oJG0+5IpE/+E1Hk1ENIoEG7 Wkb2dNozZnxFpUzwejw42ic85JtKMX/2F8qKAdX2bdT5nSxD6fDXesR52XSRCyKoIctJ mkVb0DN3gNwr0DCsGHA1VqDpzTH+gXNPYrkqc1bf+xvg+DafJ4In5S8+hfV3uZV25hoL G1UhbPzZNE+HmSn2SayVWBNGFJq0OcVhtx8EItcZuepIY6ByT/0+Tyga7ETK3V5FhWdu IakZOrF/fbxZLrolOR3f7/9x7scGIoJZmuogu6D68bmQ43dhSu+7qa9kEst8Fmx1L6nx Z1gw== 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 1-v6si449935plk.52.2018.02.23.11.50.54; Fri, 23 Feb 2018 11:51:08 -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 S934071AbeBWTtE (ORCPT + 99 others); Fri, 23 Feb 2018 14:49:04 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:43946 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934061AbeBWSqx (ORCPT ); Fri, 23 Feb 2018 13:46:53 -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 53A5BAD7; Fri, 23 Feb 2018 18:46:52 +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.9 103/145] scsi: advansys: fix build warning for PCI=n Date: Fri, 23 Feb 2018 19:26:49 +0100 Message-Id: <20180223170738.147112312@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170724.669759283@linuxfoundation.org> References: <20180223170724.669759283@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.9-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 */ }