From patchwork Mon Mar 19 12:22:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 147496 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id AD8C1B6EF1 for ; Mon, 19 Mar 2012 23:23:35 +1100 (EST) Received: from localhost ([::1]:58145 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S9bcb-0002ID-FS for incoming@patchwork.ozlabs.org; Mon, 19 Mar 2012 08:23:33 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51205) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S9bcH-0001zS-Sd for qemu-devel@nongnu.org; Mon, 19 Mar 2012 08:23:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S9bcF-0000Cg-S6 for qemu-devel@nongnu.org; Mon, 19 Mar 2012 08:23:13 -0400 Received: from e06smtp10.uk.ibm.com ([195.75.94.106]:50687) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S9bcF-0000CI-Iu for qemu-devel@nongnu.org; Mon, 19 Mar 2012 08:23:11 -0400 Received: from /spool/local by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 19 Mar 2012 12:23:07 -0000 Received: from d06nrmr1707.portsmouth.uk.ibm.com (9.149.39.225) by e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 19 Mar 2012 12:23:06 -0000 Received: from d06av12.portsmouth.uk.ibm.com (d06av12.portsmouth.uk.ibm.com [9.149.37.247]) by d06nrmr1707.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q2JCN57p2560240 for ; Mon, 19 Mar 2012 12:23:05 GMT Received: from d06av12.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av12.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q2JCN5ad020142 for ; Mon, 19 Mar 2012 06:23:05 -0600 Received: from localhost (dyn-9-174-219-44.manchester-maybrook.uk.ibm.com [9.174.219.44]) by d06av12.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q2JCN4SU020138; Mon, 19 Mar 2012 06:23:04 -0600 From: Stefan Hajnoczi To: Anthony Liguori Date: Mon, 19 Mar 2012 12:22:55 +0000 Message-Id: <1332159780-31781-4-git-send-email-stefanha@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.9.1 In-Reply-To: <1332159780-31781-1-git-send-email-stefanha@linux.vnet.ibm.com> References: <1332159780-31781-1-git-send-email-stefanha@linux.vnet.ibm.com> MIME-Version: 1.0 x-cbid: 12031912-4966-0000-0000-000001C94D54 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 195.75.94.106 Cc: Stefan Weil , qemu-devel@nongnu.org, Stefan Hajnoczi Subject: [Qemu-devel] [PATCH 3/8] ds1338: Add missing break statement 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Stefan Weil Without the break statement, case 5 sets month and year from the same data. This does not look correct. The missing break was reported by splint. Signed-off-by: Stefan Weil Reviewed-by: Peter Maydell Reviewed-by: Andreas Färber Signed-off-by: Stefan Hajnoczi --- hw/ds1338.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/ds1338.c b/hw/ds1338.c index 6397f0a..d590d9c 100644 --- a/hw/ds1338.c +++ b/hw/ds1338.c @@ -100,6 +100,7 @@ static int ds1338_send(I2CSlave *i2c, uint8_t data) break; case 5: s->now.tm_mon = from_bcd(data & 0x1f) - 1; + break; case 6: s->now.tm_year = from_bcd(data) + 100; break;