From patchwork Mon Jan 11 13:32:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corey Minyard X-Patchwork-Id: 59493 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp2112774lbb; Mon, 11 Jan 2016 05:34:45 -0800 (PST) X-Received: by 10.140.221.70 with SMTP id r67mr108849537qhb.84.1452519285460; Mon, 11 Jan 2016 05:34:45 -0800 (PST) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id x206si42012222qka.52.2016.01.11.05.34.45 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 11 Jan 2016 05:34:45 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Received: from localhost ([::1]:54204 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIccP-0003bY-1e for patch@linaro.org; Mon, 11 Jan 2016 08:34:45 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39686) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIcax-0001oL-Of for qemu-devel@nongnu.org; Mon, 11 Jan 2016 08:33:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aIcas-0006Vl-9s for qemu-devel@nongnu.org; Mon, 11 Jan 2016 08:33:15 -0500 Received: from vms173025pub.verizon.net ([206.46.173.25]:40439) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIcar-0006Ux-Us for qemu-devel@nongnu.org; Mon, 11 Jan 2016 08:33:10 -0500 Received: from serve.minyard.net ([173.57.176.17]) by vms173025.mailsrvcs.net (Oracle Communications Messaging Server 7.0.5.32.0 64bit (built Jul 16 2014)) with ESMTPA id <0O0S00BNIIYGFYD0@vms173025.mailsrvcs.net> for qemu-devel@nongnu.org; Mon, 11 Jan 2016 07:32:40 -0600 (CST) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=WcjxEBVX c=1 sm=1 tr=0 a=bXmWQgKa9n63w7XTPFb8JQ==:117 a=N54-gffFAAAA:8 a=HL3alpDKAAAA:8 a=oR5dmqMzAAAA:8 a=7aQ_Q-yQQ-AA:10 a=fk1lIlRQAAAA:8 a=20KFwNOVAAAA:8 a=KKAkSRfTAAAA:8 a=i0EeH86SAAAA:8 a=QyXUC8HyAAAA:8 a=Yf6R3UGTQqaWL1AKzqEA:9 Received: from t430.minyard.net (t430m.minyard.net [192.168.27.3]) by serve.minyard.net (Postfix) with ESMTPA id E0FB02161; Mon, 11 Jan 2016 07:32:39 -0600 (CST) Received: by t430.minyard.net (Postfix, from userid 1000) id B347D3027F5; Mon, 11 Jan 2016 07:32:39 -0600 (CST) From: minyard@acm.org To: qemu-devel@nongnu.org Date: Mon, 11 Jan 2016 07:32:32 -0600 Message-id: <1452519152-6500-3-git-send-email-minyard@acm.org> X-Mailer: git-send-email 2.5.0 In-reply-to: <1452519152-6500-1-git-send-email-minyard@acm.org> References: <1452519152-6500-1-git-send-email-minyard@acm.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.46.173.25 Cc: Peter Maydell , Xiao Guangrong , Corey Minyard , "Michael S. Tsirkin" , Stefan Hajnoczi , Shannon Zhao , Paolo Bonzini Subject: [Qemu-devel] [PATCH 2/2] ipmi_bmc_sim: Add break to correct watchdog NMI check X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Corey Minyard It was falling through when it should have been a break. Found by Coverity. The logic could be simplified a bit with a fallthrough, probably the original thought, but that would be less clear, I think. Cc: Paolo Bonzini Cc: Michael S. Tsirkin Cc: Peter Maydell Cc: Shannon Zhao Cc: Xiao Guangrong Cc: Stefan Hajnoczi Signed-off-by: Corey Minyard --- hw/ipmi/ipmi_bmc_sim.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.5.0 diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c index 3ecf02e..e522ffa 100644 --- a/hw/ipmi/ipmi_bmc_sim.c +++ b/hw/ipmi/ipmi_bmc_sim.c @@ -1101,6 +1101,8 @@ static void set_watchdog_timer(IPMIBmcSim *ibs, rsp[2] = IPMI_CC_INVALID_DATA_FIELD; goto out; } + break; + default: /* We don't support PRE_SMI */ rsp[2] = IPMI_CC_INVALID_DATA_FIELD;