Re: [Qemu-devel] [PATCH v2 6/9] hw/block/pflash_cfi01: Simplify CFI_QUERY processing

2019-07-02 Thread Alistair Francis
On Mon, Jul 1, 2019 at 5:15 PM Philippe Mathieu-Daudé wrote: > > The current code does: > > if (write_cycle == 0) > if (command == CFI_QUERY) > break > write_cycle += 1 > last_command = command > > if (write_cycle == 1) > if (last_command == CFI_QUERY) > if (command == READ_ARRAY

[Qemu-devel] [PATCH v2 6/9] hw/block/pflash_cfi01: Simplify CFI_QUERY processing

2019-07-01 Thread Philippe Mathieu-Daudé
The current code does: if (write_cycle == 0) if (command == CFI_QUERY) break write_cycle += 1 last_command = command if (write_cycle == 1) if (last_command == CFI_QUERY) if (command == READ_ARRAY write_cycle = 0 last_command = READ_ARRAY Simplify by not increasing