From patchwork Tue Jun 21 01:57:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stewart Smith X-Patchwork-Id: 638387 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rYWB15g9Pz9sdg for ; Tue, 21 Jun 2016 11:59:21 +1000 (AEST) Received: from ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3rYWB14nhMzDrMb for ; Tue, 21 Jun 2016 11:59:21 +1000 (AEST) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rYW8Y4d5KzDqmD for ; Tue, 21 Jun 2016 11:58:05 +1000 (AEST) Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u5L1sk3g026815 for ; Mon, 20 Jun 2016 21:58:03 -0400 Received: from e37.co.us.ibm.com (e37.co.us.ibm.com [32.97.110.158]) by mx0b-001b2d01.pphosted.com with ESMTP id 23n2fyfr7m-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 20 Jun 2016 21:58:02 -0400 Received: from localhost by e37.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 20 Jun 2016 19:58:02 -0600 Received: from d03dlp01.boulder.ibm.com (9.17.202.177) by e37.co.us.ibm.com (192.168.1.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 20 Jun 2016 19:58:00 -0600 X-IBM-Helo: d03dlp01.boulder.ibm.com X-IBM-MailFrom: stewart@linux.vnet.ibm.com Received: from b01cxnp22033.gho.pok.ibm.com (b01cxnp22033.gho.pok.ibm.com [9.57.198.23]) by d03dlp01.boulder.ibm.com (Postfix) with ESMTP id 27FA31FF0043 for ; Mon, 20 Jun 2016 19:57:44 -0600 (MDT) Received: from b01ledav03.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u5L1vxL242467478; Tue, 21 Jun 2016 01:57:59 GMT Received: from b01ledav03.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D0ADDB2058; Mon, 20 Jun 2016 21:57:59 -0400 (EDT) Received: from birb.localdomain (unknown [9.83.5.130]) by b01ledav03.gho.pok.ibm.com (Postfix) with SMTP id 0632CB204D; Mon, 20 Jun 2016 21:57:58 -0400 (EDT) Received: from ka1.ozlabs.ibm.com (localhost.localdomain [127.0.0.1]) by birb.localdomain (Postfix) with ESMTP id DB42A229EAB0; Tue, 21 Jun 2016 11:57:54 +1000 (AEST) From: Stewart Smith To: skiboot@lists.ozlabs.org Date: Tue, 21 Jun 2016 11:57:52 +1000 X-Mailer: git-send-email 2.1.4 X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16062101-0024-0000-0000-000013EFA8E2 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16062101-0025-0000-0000-000041FDB69D Message-Id: <1466474272-20572-1-git-send-email-stewart@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2016-06-21_01:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1606210021 Subject: [Skiboot] [PATCH] ibm-fsp/firenze: Fix unused overwritten value X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Found with static analysis: 939 id = ((uint64_t)p[1] << 32) | p[2]; value_overwrite: Overwriting previous write to id with value 0ULL. 940 id = 0; Fixes: 6884fe63 Signed-off-by: Stewart Smith Acked-by: Gavin Shan --- platforms/ibm-fsp/firenze-pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platforms/ibm-fsp/firenze-pci.c b/platforms/ibm-fsp/firenze-pci.c index b13f1e52fc05..4a9aff300504 100644 --- a/platforms/ibm-fsp/firenze-pci.c +++ b/platforms/ibm-fsp/firenze-pci.c @@ -937,7 +937,7 @@ static void firenze_pci_slot_fixup(struct pci_slot *slot) /* FIXME: support fixup with generic way */ id = ((uint64_t)p[1] << 32) | p[2]; - id = 0; + if (id != LX_VPD_2S4U_BACKPLANE && id != LX_VPD_1S4U_BACKPLANE) return;