From: David Gibson <david@gibson.dropbear.id.au>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
qemu-devel@nongnu.org, qemu-ppc@nongnu.org,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Artyom Tarasenko" <atar4qemu@gmail.com>,
"Hervé Poussineau" <hpoussin@reactos.org>
Subject: Re: [Qemu-devel] [PATCH 1/3] hw/ppc/prep: use TYPE_MC146818_RTC instead of a hardcoded string
Date: Mon, 6 May 2019 13:25:40 +1000 [thread overview]
Message-ID: <20190506032540.GD6790@umbus.fritz.box> (raw)
In-Reply-To: <20190505152839.18650-2-philmd@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1128 bytes --]
On Sun, May 05, 2019 at 05:28:37PM +0200, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Certainly a good fix, but looks like there's places in
hw/timer/mc146818rtc.c itself and in vl.c which could also do with
this.
> ---
> hw/ppc/prep.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c
> index b7f459d4754..ebee3211480 100644
> --- a/hw/ppc/prep.c
> +++ b/hw/ppc/prep.c
> @@ -601,7 +601,7 @@ static int prep_set_cmos_checksum(DeviceState *dev, void *opaque)
> uint16_t checksum = *(uint16_t *)opaque;
> ISADevice *rtc;
>
> - if (object_dynamic_cast(OBJECT(dev), "mc146818rtc")) {
> + if (object_dynamic_cast(OBJECT(dev), TYPE_MC146818_RTC)) {
> rtc = ISA_DEVICE(dev);
> rtc_set_memory(rtc, 0x2e, checksum & 0xff);
> rtc_set_memory(rtc, 0x3e, checksum & 0xff);
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2019-05-06 3:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-05 15:28 [Qemu-devel] [PATCH 0/3] hw/ppc/40p: Move the MC146818 RTC to the board where it belongs Philippe Mathieu-Daudé
2019-05-05 15:28 ` Philippe Mathieu-Daudé
2019-05-05 15:28 ` [Qemu-devel] [PATCH 1/3] hw/ppc/prep: use TYPE_MC146818_RTC instead of a hardcoded string Philippe Mathieu-Daudé
2019-05-05 15:28 ` Philippe Mathieu-Daudé
2019-05-06 3:25 ` David Gibson [this message]
2019-05-05 15:28 ` [Qemu-devel] [PATCH 2/3] hw/ppc/40p: Move the MC146818 RTC to the board where it belongs Philippe Mathieu-Daudé
2019-05-05 15:28 ` Philippe Mathieu-Daudé
2019-05-05 15:28 ` [Qemu-devel] [PATCH 3/3] hw/ppc/40p: use 1900 as a base year Philippe Mathieu-Daudé
2019-05-05 15:28 ` Philippe Mathieu-Daudé
2019-05-06 3:25 ` [Qemu-devel] [PATCH 0/3] hw/ppc/40p: Move the MC146818 RTC to the board where it belongs David Gibson
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=20190506032540.GD6790@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=atar4qemu@gmail.com \
--cc=hpoussin@reactos.org \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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).