[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 2/3] mc146818rtc: Tidy up indentation
From: |
Paolo Bonzini |
Subject: |
Re: [PATCH v3 2/3] mc146818rtc: Tidy up indentation |
Date: |
Thu, 24 Oct 2019 15:01:47 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
On 24/10/19 14:24, Philippe Mathieu-Daudé wrote:
> - * if the periodic timer's update is due to period re-configuration,
> - * we should count the clock since last interrupt.
> - */
> - if (old_period) {
> - int64_t last_periodic_clock, next_periodic_clock;
> + /*
> + * if the periodic timer's update is due to period re-configuration,
> + * we should count the clock since last interrupt.
> + */
> + if (old_period) {
> + int64_t last_periodic_clock, next_periodic_clock;
>
> - next_periodic_clock = muldiv64(s->next_periodic_time,
> - RTC_CLOCK_RATE, NANOSECONDS_PER_SECOND);
> - last_periodic_clock = next_periodic_clock - old_period;
> - lost_clock = cur_clock - last_periodic_clock;
> - assert(lost_clock >= 0);
> + next_periodic_clock = muldiv64(s->next_periodic_time,
> + RTC_CLOCK_RATE, NANOSECONDS_PER_SECOND);
> + last_periodic_clock = next_periodic_clock - old_period;
> + lost_clock = cur_clock - last_periodic_clock;
> + assert(lost_clock >= 0);
> }
>
> /*
Still not entirely tidy, is it? I understand making Marcelo's fix just
move a brace, but in general you can review with "git show -b" to see
more clearly what's going on. Therefore, it would make the most sense
to have just two patches, one reversing the if and one fixing the bug
(and both of them having indentation changes).
However, I'm preparing the pull request now so I think I'll just keep
Marcelo's version.
Paolo