From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:47418) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tili3-0008PX-6U for qemu-devel@nongnu.org; Wed, 12 Dec 2012 07:46:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tilhw-0004Wl-19 for qemu-devel@nongnu.org; Wed, 12 Dec 2012 07:46:47 -0500 Received: from mail-la0-f45.google.com ([209.85.215.45]:37862) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tilhv-0004U8-K8 for qemu-devel@nongnu.org; Wed, 12 Dec 2012 07:46:39 -0500 Received: by mail-la0-f45.google.com with SMTP id p9so546780laa.4 for ; Wed, 12 Dec 2012 04:46:38 -0800 (PST) Message-ID: <50C87C9F.8070904@gmail.com> Date: Wed, 12 Dec 2012 13:46:23 +0100 From: Antoine Mathys MIME-Version: 1.0 References: <50C7B767.8020406@gmail.com> <50C7BA7A.5060705@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 4/6] hw/ds1338.c: Ensure state is properly initialized. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel@nongnu.org, paul@codesourcery.com On 12/12/2012 01:05 PM, Peter Maydell wrote: > I think we need to reset ptr and addr_byte too... The initial value of the register pointer is unspecified. addr_byte is only used when receiving user data. It is written in ds1338_event() then read in ds1338_send(). Setting it in ds1338_reset() is unnecessary and would break encapsulation.