qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Antoine Mathys <barsamin@gmail.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>, paul@codesourcery.com
Subject: [Qemu-devel] [PATCH v4 1/6] hw/ds1338.c: Correct bug in conversion to BCD.
Date: Wed, 12 Dec 2012 23:59:08 +0100	[thread overview]
Message-ID: <50C90C3C.9040703@gmail.com> (raw)
In-Reply-To: <50C90B8D.3090801@gmail.com>


Signed-off-by: Antoine Mathys <barsamin@gmail.com>
---
  hw/ds1338.c |    4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/ds1338.c b/hw/ds1338.c
index b576d56..faaa4a0 100644
--- a/hw/ds1338.c
+++ b/hw/ds1338.c
@@ -57,9 +57,9 @@ static void capture_current_time(DS1338State *s)
      } else {
          s->nvram[2] = to_bcd(now.tm_hour);
      }
-    s->nvram[3] = to_bcd(now.tm_wday) + 1;
+    s->nvram[3] = to_bcd(now.tm_wday + 1);
      s->nvram[4] = to_bcd(now.tm_mday);
-    s->nvram[5] = to_bcd(now.tm_mon) + 1;
+    s->nvram[5] = to_bcd(now.tm_mon + 1);
      s->nvram[6] = to_bcd(now.tm_year - 100);
  }

-- 
1.7.10.4

  reply	other threads:[~2012-12-12 22:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-12 22:56 [Qemu-devel] [PATCH v4 0/6] hw/ds1338.c Antoine Mathys
2012-12-12 22:59 ` Antoine Mathys [this message]
2012-12-12 22:59 ` [Qemu-devel] [PATCH v4 2/6] hw/ds1338.c: Add definitions for various flags in the RTC registers Antoine Mathys
2012-12-12 22:59 ` [Qemu-devel] [PATCH v4 3/6] hw/ds1338.c: Fix handling of HOURS register Antoine Mathys
2012-12-12 22:59 ` [Qemu-devel] [PATCH v4 4/6] hw/ds1338.c: Ensure state is properly initialized Antoine Mathys
2012-12-12 23:00 ` [Qemu-devel] [PATCH v4 5/6] hw/ds1338.c: Implement support for the control register Antoine Mathys
2012-12-12 23:00 ` [Qemu-devel] [PATCH v4 6/6] hw/ds1338.c: Fix handling of DAY (wday) register Antoine Mathys
2012-12-13 14:09 ` [Qemu-devel] [PATCH v4 0/6] hw/ds1338.c Peter Maydell
2012-12-14 13:40   ` Antoine Mathys

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=50C90C3C.9040703@gmail.com \
    --to=barsamin@gmail.com \
    --cc=paul@codesourcery.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).