From patchwork Tue Nov 10 07:44:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stewart Smith X-Patchwork-Id: 542198 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 20C78140291 for ; Tue, 10 Nov 2015 18:45:08 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 02D511A0279 for ; Tue, 10 Nov 2015 18:45:08 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from e35.co.us.ibm.com (e35.co.us.ibm.com [32.97.110.153]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 99BF21A0297 for ; Tue, 10 Nov 2015 18:44:45 +1100 (AEDT) Received: from localhost by e35.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 10 Nov 2015 00:44:43 -0700 Received: from d03dlp03.boulder.ibm.com (9.17.202.179) by e35.co.us.ibm.com (192.168.1.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 10 Nov 2015 00:44:40 -0700 X-IBM-Helo: d03dlp03.boulder.ibm.com X-IBM-MailFrom: stewart@linux.vnet.ibm.com X-IBM-RcptTo: skiboot@lists.ozlabs.org Received: from b03cxnp07028.gho.boulder.ibm.com (b03cxnp07028.gho.boulder.ibm.com [9.17.130.15]) by d03dlp03.boulder.ibm.com (Postfix) with ESMTP id 37F6C19D803F for ; Tue, 10 Nov 2015 00:32:48 -0700 (MST) Received: from d03av05.boulder.ibm.com (d03av05.boulder.ibm.com [9.17.195.85]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id tAA7fCxi63438892 for ; Tue, 10 Nov 2015 00:41:12 -0700 Received: from d03av05.boulder.ibm.com (localhost [127.0.0.1]) by d03av05.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id tAA7idsp026463 for ; Tue, 10 Nov 2015 00:44:39 -0700 Received: from oc8180480414.ibm.com ([9.81.198.226]) by d03av05.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with SMTP id tAA7iUFC026208; Tue, 10 Nov 2015 00:44:38 -0700 Received: from ka1.ozlabs.ibm.com (localhost [127.0.0.1]) by oc8180480414.ibm.com (Postfix) with ESMTP id D29B55768; Tue, 10 Nov 2015 18:44:26 +1100 (AEDT) From: Stewart Smith To: skiboot@lists.ozlabs.org Date: Tue, 10 Nov 2015 18:44:13 +1100 Message-Id: <1447141453-19876-8-git-send-email-stewart@linux.vnet.ibm.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1447141453-19876-1-git-send-email-stewart@linux.vnet.ibm.com> References: <1447141453-19876-1-git-send-email-stewart@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15111007-0013-0000-0000-00001A1965D3 Subject: [Skiboot] [PATCH 7/7] llvm-scan-build: fix dead assignment in hw/lpc.c X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.20 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" hw/lpc.c:533:3: warning: Value stored to 'rc' is never read rc = opb_read(chip, lpc_reg_opb_base + LPC_HC_IRQMASK, &val, 4); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ hw/lpc.c:535:3: warning: Value stored to 'rc' is never read rc = opb_read(chip, lpc_reg_opb_base + LPC_HC_IRQSER_CTRL, &val, 4); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Stewart Smith --- hw/lpc.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/hw/lpc.c b/hw/lpc.c index 0e88e9f0081b..60fefdb1c969 100644 --- a/hw/lpc.c +++ b/hw/lpc.c @@ -531,9 +531,16 @@ static void lpc_setup_serirq(struct proc_chip *chip) { u32 val; rc = opb_read(chip, lpc_reg_opb_base + LPC_HC_IRQMASK, &val, 4); - DBG_IRQ("LPC: MASK READBACK=%x\n", val); + if (rc) + prerror("LPC: failed to readback mask"); + else + DBG_IRQ("LPC: MASK READBACK=%x\n", val); + rc = opb_read(chip, lpc_reg_opb_base + LPC_HC_IRQSER_CTRL, &val, 4); - DBG_IRQ("LPC: CTRL READBACK=%x\n", val); + if (rc) + prerror("LPC: failed to readback ctrl"); + else + DBG_IRQ("LPC: CTRL READBACK=%x\n", val); } }