From patchwork Mon Feb 8 17:03:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 8252681 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8478EBEEE5 for ; Mon, 8 Feb 2016 17:12:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D6D2620107 for ; Mon, 8 Feb 2016 17:12:37 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E94CB203DC for ; Mon, 8 Feb 2016 17:12:36 +0000 (UTC) Received: from localhost ([::1]:46924 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSpMa-0001xA-7P for patchwork-qemu-devel@patchwork.kernel.org; Mon, 08 Feb 2016 12:12:36 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43751) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSpEJ-00043N-CS for qemu-devel@nongnu.org; Mon, 08 Feb 2016 12:04:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aSpEG-0006vt-3a for qemu-devel@nongnu.org; Mon, 08 Feb 2016 12:04:03 -0500 Received: from mail-wm0-x234.google.com ([2a00:1450:400c:c09::234]:37640) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSpEF-0006vp-T6 for qemu-devel@nongnu.org; Mon, 08 Feb 2016 12:04:00 -0500 Received: by mail-wm0-x234.google.com with SMTP id g62so125524579wme.0 for ; Mon, 08 Feb 2016 09:03:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=QOfav0kEvfURcNjSRdeP7/Fj4+gmQ+JbRO5O+9frlSE=; b=QXlpQRhnyLAnNghtLdwqsnJfdZkEMCx2LRDSdUVs2cGobYLdhYBGXebRHhOOxjmvxq 7n/bbQaG/O1aAxfh+ztHuiRlxwbYniGZR9bHA47L4fHYnh26/yhudwxKAmm+z0Lrg4Y9 PqeAak0ipkNKzYhUUpMmMSofIYpEKzkDAoI4oyyTNAYMkELJNHTDJniagoUPeoEBm5Gv B3CtQZ4m6Si68cW+wJOlRb7i42++G3jGe6xTH3Ld9J7XYEdyh/m2Oq2VyUUlJfJcaZYj haCXGYcbVx/rEbaaByMsrCBRE5ySG6cdnTQE+fHsX7NE0Y0sLX8jVNxu5ceOYRd9FmB7 F7fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=QOfav0kEvfURcNjSRdeP7/Fj4+gmQ+JbRO5O+9frlSE=; b=NwrQUnB/SbUPDhUw0OnpGpMgdIvC8AKmnesBr8UllxMZw/nfo6WyYznsGjs2kzJ4Ck I7OeIyaOjNzYksEn2hYTxxHMt1Dd3IImqr7N3lQR5ah0oJhXsZ2FoCz1U+JKXrqM653X x188VJJpm5z96nezJAPtbAP7C8BSiDMDlBaJp7IDKLbTp7rlg7lZRvrBRM5+Thk5zbZ5 lNugj5ohb7GMatNTKHqjsejN8GToiq1K03D1UGbp+CM+HOincgCUXIzxitYqG3ie5eku 2LCYpfb2Jrz6DPV+ByD8XSdPjP+hKMmf0IhK+9nsolellC7vVvdJJX1n++nPdhRL2pWM 3lAQ== X-Gm-Message-State: AG10YOSEBk3Mi3YLKkcVVKeTC4Y+zifVwhKecmp5H3A/LM1P58Cyfd4ASgHjorIRKK1CQw== X-Received: by 10.28.111.135 with SMTP id c7mr28774642wmi.46.1454951038956; Mon, 08 Feb 2016 09:03:58 -0800 (PST) Received: from 640k.lan (94-39-141-130.adsl-ull.clienti.tiscali.it. [94.39.141.130]) by smtp.gmail.com with ESMTPSA id b1sm30651442wjy.0.2016.02.08.09.03.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Feb 2016 09:03:58 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Mon, 8 Feb 2016 18:03:19 +0100 Message-Id: <1454950999-64128-29-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1454950999-64128-1-git-send-email-pbonzini@redhat.com> References: <1454950999-64128-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::234 Cc: Peter Maydell , Xiao Guangrong , Corey Minyard , "Michael S. Tsirkin" , Stefan Hajnoczi , Shannon Zhao Subject: [Qemu-devel] [PULL 28/28] 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Message-Id: <1452519152-6500-3-git-send-email-minyard@acm.org> Signed-off-by: Paolo Bonzini --- hw/ipmi/ipmi_bmc_sim.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c index b3796af..f8b2176 100644 --- a/hw/ipmi/ipmi_bmc_sim.c +++ b/hw/ipmi/ipmi_bmc_sim.c @@ -1135,6 +1135,8 @@ static void set_watchdog_timer(IPMIBmcSim *ibs, rsp[2] = IPMI_CC_INVALID_DATA_FIELD; return; } + break; + default: /* We don't support PRE_SMI */ rsp[2] = IPMI_CC_INVALID_DATA_FIELD;