[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] hw/m68k/next-cube: Avoid static RTC variables and introduce
From: |
Richard Henderson |
Subject: |
Re: [PATCH] hw/m68k/next-cube: Avoid static RTC variables and introduce control register |
Date: |
Sat, 21 Sep 2019 08:24:54 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
On 9/21/19 2:17 AM, Thomas Huth wrote:
> Coverity currently complains that the "if (0x00 & (0x80 >> (phase - 8))"
> in next-cube.c can never be true. Right it is. The "0x00" is meant as value
> of the control register of the RTC, which is currently not implemented yet.
> Thus, let's add a register variable for this now. However, the RTC
> registers are currently defined as static variables in nextscr2_write(),
> which is quite ugly. Thus let's also move the RTC variables to the main
> machine state instead. In the long run, we should likely even refactor
> the whole RTC code into a separate device in a separate file, but that's
> something for calm winter nights later... as a first step, cleaning up
> the static variables and shutting up the warning from Coverity should
> be sufficient.
>
> Signed-off-by: Thomas Huth <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
> /* for now 0x00 */
> - if (0x00 & (0x80 >> (phase - 8))) {
> + if (rtc->control & (0x80 >> (phase - 8))) {
You might kill the comment too.
r~