[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 03/14] timer: ds1338 persist 12-hour mode select
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 03/14] timer: ds1338 persist 12-hour mode selection |
Date: |
Thu, 12 Apr 2018 19:03:21 +0100 |
On 24 March 2018 at 19:24, Michael Davidsaver <address@hidden> wrote:
> Need to save HOUR[HOUR12] bit to keep
> track of guest selection of 12-hour mode.
> Write through current time registers to
> achieve this. Will be overwritten
> by the next read/latch.
>
> Signed-off-by: Michael Davidsaver <address@hidden>
> ---
> hw/timer/ds1338.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/hw/timer/ds1338.c b/hw/timer/ds1338.c
> index b5630e214a..72a4692d60 100644
> --- a/hw/timer/ds1338.c
> +++ b/hw/timer/ds1338.c
> @@ -224,10 +224,8 @@ static int ds1338_send(I2CSlave *i2c, uint8_t data)
> value unchanged. */
> data = (data & ~CTRL_OSF) | (data & s->nvram[s->ptr] & CTRL_OSF);
>
> - s->nvram[s->ptr] = data;
> - } else {
> - s->nvram[s->ptr] = data;
> }
> + s->nvram[s->ptr] = data;
> inc_regptr(s);
> return 0;
The code change here looks like a reasonable no-behaviour-change
simplification of the code, but it doesn't match up with
the description in the commit message ?
thanks
-- PMM
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH 03/14] timer: ds1338 persist 12-hour mode selection,
Peter Maydell <=