[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] aux: fix break that wanted to break two levels
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH] aux: fix break that wanted to break two levels out |
Date: |
Mon, 4 Jul 2016 18:29:58 +0100 |
On 21 June 2016 at 14:16, Paolo Bonzini <address@hidden> wrote:
> The last "ret = AUX_I2C_NACK;" is dead, because it is always overridden
> by AUX_I2C_ACK. What really the code wants is to jump out of the switch
> statement, and a "return" will not cut it because it would omit a debug
> printf.
>
> Change the logic so that we can break out of the while loop. For clarity,
> hoist the bus->last_* assignments up, right after i2c_start_transfer.
>
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
> hw/misc/aux.c | 12 ++++++------
Applied to target-arm.next, thanks.
-- PMM
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH] aux: fix break that wanted to break two levels out,
Peter Maydell <=