From: Antoine Mathys <barsamin@gmail.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org, paul@codesourcery.com
Subject: Re: [Qemu-devel] [PATCH v2 4/6] hw/ds1338.c: Ensure state is properly initialized.
Date: Wed, 12 Dec 2012 14:11:28 +0100 [thread overview]
Message-ID: <50C88280.6030506@gmail.com> (raw)
In-Reply-To: <CAFEAcA93BAg_3LyiB8udeoWC0UUbKE6=uOwvYUmLw7CfVkDJtQ@mail.gmail.com>
> It's true that it probably doesn't make much difference, but
> both the addr_byte and ptr are part of the migration state
> listed in the vmstate struct. I think it is cleaner and
> more straightforward to reason about if resetting the
> device returns it to an exact known state. The state may be
> undefined according to the specification but that doesn't
> mean that our implementation has to leave it undefined.
>
> I don't understand your point about encapsulation -- these
> are both fields of the device state, and ds1338_reset()
> is a method of the device and has every right to access
> them.
You are right. While it is not strictly necessary it is cleaner (and
safer) to set every field to a reasonable value. In addition some guest
code probably incorrectly assumes that the pointer is initially at zero
so that wouldn't hurt.
Would it be ok to reply with a new version of this patch only, instead
of resending the whole series ?
next prev parent reply other threads:[~2012-12-12 13:12 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-11 22:44 [Qemu-devel] [PATCH v2 0/6] hw/ds1338.c Antoine Mathys
2012-12-11 22:49 ` [Qemu-devel] [PATCH v2 1/6] hw/ds1338.c: Correct bug in conversion to BCD Antoine Mathys
2012-12-12 12:08 ` Peter Maydell
2012-12-11 22:52 ` [Qemu-devel] [PATCH v2 2/6] hw/ds1338.c: Add definitions for various flags in the RTC registers Antoine Mathys
2012-12-12 12:09 ` Peter Maydell
2012-12-11 22:57 ` [Qemu-devel] [PATCH v2 3/6] hw/ds1338.c: Fix handling of HOURS register Antoine Mathys
2012-12-12 12:10 ` Peter Maydell
2012-12-11 22:58 ` [Qemu-devel] [PATCH v2 4/6] hw/ds1338.c: Ensure state is properly initialized Antoine Mathys
2012-12-12 12:05 ` Peter Maydell
2012-12-12 12:46 ` Antoine Mathys
2012-12-12 13:02 ` Peter Maydell
2012-12-12 13:11 ` Antoine Mathys [this message]
2012-12-12 13:31 ` Peter Maydell
2012-12-11 22:58 ` [Qemu-devel] [PATCH v2 5/6] hw/ds1338.c: Implement support for the control register Antoine Mathys
2012-12-12 12:18 ` Peter Maydell
2012-12-11 22:59 ` [Qemu-devel] [PATCH v2 6/6] hw/ds1338.c: Fix handling of DAY (wday) register Antoine Mathys
2012-12-12 12:23 ` 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=50C88280.6030506@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.