From patchwork Fri Jul 20 15:00:28 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 172288 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 E84D22C03EB for ; Sat, 21 Jul 2012 01:01:08 +1000 (EST) Received: from localhost ([::1]:34228 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SsEhW-0003Vk-Vu for incoming@patchwork.ozlabs.org; Fri, 20 Jul 2012 11:01:06 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59598) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SsEh5-000355-AF for qemu-devel@nongnu.org; Fri, 20 Jul 2012 11:00:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SsEgz-0006Sg-Dp for qemu-devel@nongnu.org; Fri, 20 Jul 2012 11:00:39 -0400 Received: from mnementh.archaic.org.uk ([81.2.115.146]:57941) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SsEgz-0006Q0-6v for qemu-devel@nongnu.org; Fri, 20 Jul 2012 11:00:33 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1SsEgx-0004L1-0Q; Fri, 20 Jul 2012 16:00:31 +0100 From: Peter Maydell To: Anthony Liguori , Blue Swirl Date: Fri, 20 Jul 2012 16:00:28 +0100 Message-Id: <1342796430-16636-9-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1342796430-16636-1-git-send-email-peter.maydell@linaro.org> References: <1342796430-16636-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 81.2.115.146 Cc: qemu-devel@nongnu.org, Paul Brook Subject: [Qemu-devel] [PATCH 08/10] hw/exynos4210_rtc.c: Fix calculating for value of year 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: Oleg Ogurtsov Signed-off-by: Oleg Ogurtsov Signed-off-by: Peter Maydell --- hw/exynos4210_rtc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/exynos4210_rtc.c b/hw/exynos4210_rtc.c index f781020..b42586e 100644 --- a/hw/exynos4210_rtc.c +++ b/hw/exynos4210_rtc.c @@ -142,7 +142,7 @@ static const VMStateDescription vmstate_exynos4210_rtc_state = { }; #define BCD3DIGITS(x) \ - ((uint32_t)to_bcd((uint8_t)x) + \ + ((uint32_t)to_bcd((uint8_t)(x % 100)) + \ ((uint32_t)to_bcd((uint8_t)((x % 1000) / 100)) << 8)) static void check_alarm_raise(Exynos4210RTCState *s)