From patchwork Wed Dec 12 22:29:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antoine Mathys X-Patchwork-Id: 205670 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 1E0962C0084 for ; Thu, 13 Dec 2012 09:29:37 +1100 (EST) Received: from localhost ([::1]:60753 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tiuo3-0007oh-7d for incoming@patchwork.ozlabs.org; Wed, 12 Dec 2012 17:29:35 -0500 Received: from eggs.gnu.org ([208.118.235.92]:37593) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tiunq-0007dy-TX for qemu-devel@nongnu.org; Wed, 12 Dec 2012 17:29:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tiunp-00054S-Gs for qemu-devel@nongnu.org; Wed, 12 Dec 2012 17:29:22 -0500 Received: from mail-ea0-f173.google.com ([209.85.215.173]:54745) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tiunp-00054L-Ax for qemu-devel@nongnu.org; Wed, 12 Dec 2012 17:29:21 -0500 Received: by mail-ea0-f173.google.com with SMTP id i13so445814eaa.4 for ; Wed, 12 Dec 2012 14:29:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=A188xd0HyAXDztvT5s2D4YcXSaWDnTVLtVynmiy84Do=; b=vhLjhGTFoi2y62R+ZHQ7PfNMVNhxKftKR8G5uow28U6ZuST1HecjE5rYnTeuPLwhIq U80PWxGoTOEbJzV3ouFOTyDAd3E/Q2JrwA9EDq9GDeMOvGlWhBuebwViydmlC+LfoQM8 rCX/7ihh3ugL3Eo9CVCMljfAAa6qXQCTrZBVbckAbCb37XGlYaXYTLPBENr+rK/fxD8/ m9/wTaZGGdB4gvU3xsAduAvpFEczMgkMUy9/TsxQt6Y3Hjq65gxdEPmoKzprdnKxVltl qkxxz7wFAeo5UzbNKI/bgVSOKuLuYjHLlZQ//L+xj/sVUKesbCnhO1sf7PdAkY+SHbmH t3ew== Received: by 10.14.216.70 with SMTP id f46mr6565095eep.12.1355351360555; Wed, 12 Dec 2012 14:29:20 -0800 (PST) Received: from [192.168.1.33] (adsl-84-227-232-139.adslplus.ch. [84.227.232.139]) by mx.google.com with ESMTPS id w44sm33671932eep.6.2012.12.12.14.29.16 (version=SSLv3 cipher=OTHER); Wed, 12 Dec 2012 14:29:19 -0800 (PST) Message-ID: <50C90537.10407@gmail.com> Date: Wed, 12 Dec 2012 23:29:11 +0100 From: Antoine Mathys User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: qemu-devel@nongnu.org References: <50C9041A.8020202@gmail.com> In-Reply-To: <50C9041A.8020202@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.215.173 Cc: Peter Maydell , paul@codesourcery.com Subject: Re: [Qemu-devel] [PATCH v3 1/6] hw/ds1338.c: Correct bug in conversion to BCD. 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 Signed-off-by: Antoine Mathys --- 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); }