qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Oleg Ogurtsov <o.ogurtsov@samsung.com>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, kyungmin.park@samsung.com,
	Oleg Ogurtsov <o.ogurtsov@samsung.com>,
	e.voevodin@samsung.com
Subject: [Qemu-devel] [PATCH 1/2] hw/exynos4210_rtc.c: Fix calculating for value of year
Date: Wed, 11 Jul 2012 14:03:27 +0400	[thread overview]
Message-ID: <1342001008-18305-2-git-send-email-o.ogurtsov@samsung.com> (raw)
In-Reply-To: <1342001008-18305-1-git-send-email-o.ogurtsov@samsung.com>


Signed-off-by: Oleg Ogurtsov <o.ogurtsov@samsung.com>
---
 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)
-- 
1.7.5.4

  reply	other threads:[~2012-07-11 10:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-11 10:03 [Qemu-devel] [PATCH 0/2] Exynos4210 RTC Oleg Ogurtsov
2012-07-11 10:03 ` Oleg Ogurtsov [this message]
2012-07-20 13:15   ` [Qemu-devel] [PATCH 1/2] hw/exynos4210_rtc.c: Fix calculating for value of year Peter Maydell
2012-07-11 10:03 ` [Qemu-devel] [PATCH 2/2] hw/exynos4210_rtc.c: remove unnecessary code Oleg Ogurtsov
2012-07-20 13:17   ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1342001008-18305-2-git-send-email-o.ogurtsov@samsung.com \
    --to=o.ogurtsov@samsung.com \
    --cc=e.voevodin@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).