From patchwork Thu Nov 29 04:28:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stewart Smith X-Patchwork-Id: 1005050 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4354dW2zndz9s47 for ; Thu, 29 Nov 2018 15:42:55 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4354dW1NmDzDqnZ for ; Thu, 29 Nov 2018 15:42:55 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=linux.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=stewart@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com 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 4354K83Cy5zDr3Q for ; Thu, 29 Nov 2018 15:28:44 +1100 (AEDT) Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wAT4O9PB047132 for ; Wed, 28 Nov 2018 23:28:42 -0500 Received: from e15.ny.us.ibm.com (e15.ny.us.ibm.com [129.33.205.205]) by mx0a-001b2d01.pphosted.com with ESMTP id 2p287khu3m-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 28 Nov 2018 23:28:42 -0500 Received: from localhost by e15.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 29 Nov 2018 04:28:41 -0000 Received: from b01cxnp22034.gho.pok.ibm.com (9.57.198.24) by e15.ny.us.ibm.com (146.89.104.202) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 29 Nov 2018 04:28:40 -0000 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp22034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id wAT4SdnL16449550 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 29 Nov 2018 04:28:39 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 157BA12405B for ; Thu, 29 Nov 2018 04:28:39 +0000 (GMT) Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D20E9124053 for ; Thu, 29 Nov 2018 04:28:38 +0000 (GMT) Received: from birb.localdomain (unknown [9.185.142.67]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTP for ; Thu, 29 Nov 2018 04:28:38 +0000 (GMT) Received: by birb.localdomain (Postfix, from userid 1000) id C6E2F4EC93D; Thu, 29 Nov 2018 15:28:34 +1100 (AEDT) From: Stewart Smith To: skiboot@lists.ozlabs.org Date: Thu, 29 Nov 2018 15:28:32 +1100 X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181129042833.27376-1-stewart@linux.ibm.com> References: <20181129042833.27376-1-stewart@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 18112904-0068-0000-0000-00000368C6AB X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010140; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000270; SDB=6.01124286; UDB=6.00583713; IPR=6.00904413; MB=3.00024376; MTD=3.00000008; XFM=3.00000015; UTC=2018-11-29 04:28:40 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18112904-0069-0000-0000-00004695C4D8 Message-Id: <20181129042833.27376-8-stewart@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-11-29_03:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1811290035 Subject: [Skiboot] [PATCH 7/8] hdata/iohub.c: remove condition that was always true X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Caught by static analysis. The previous if() condition was ensuring lxr was not null, so we don't need this additional check. Signed-off-by: Stewart Smith --- hdata/iohub.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hdata/iohub.c b/hdata/iohub.c index f37f5abf31c8..e16fb0b4e3fd 100644 --- a/hdata/iohub.c +++ b/hdata/iohub.c @@ -82,8 +82,7 @@ static bool io_get_lx_info(const void *kwvpd, unsigned int kwvpd_sz, return false; } - if (lxr) - memcpy(lxrbuf, lxr, sizeof(uint32_t)*2); + memcpy(lxrbuf, lxr, sizeof(uint32_t)*2); prlog(PR_DEBUG, "CEC: LXRn=%d LXR=%08x%08x\n", lx_idx, lxrbuf[0], lxrbuf[1]); prlog(PR_DEBUG, "CEC: LX Info added to %llx\n", (long long)hn);