[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH 1/3] hw/ppc/prep: use TYPE_MC146818_RTC instead of
From: |
David Gibson |
Subject: |
Re: [Qemu-ppc] [PATCH 1/3] hw/ppc/prep: use TYPE_MC146818_RTC instead of a hardcoded string |
Date: |
Mon, 6 May 2019 13:25:40 +1000 |
User-agent: |
Mutt/1.11.3 (2019-02-01) |
On Sun, May 05, 2019 at 05:28:37PM +0200, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
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
signature.asc
Description: PGP signature