On 24/3/24 20:17, Mark Cave-Ayland wrote:
The esp_cdb_length() function is only used as part of a calculation to determine
whether the cmdfifo contains an entire SCSI CDB. Rework esp_cdb_length() into a
new esp_cdb_ready() function which both enables us to handle the case where
scsi_cdb_length() returns -1, plus simplify the logic for its callers.
Suggested-by: Paolo Bonzini <pbonz...@redhat.com>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayl...@ilande.co.uk>
---
hw/scsi/esp.c | 30 ++++++++++++++----------------
1 file changed, 14 insertions(+), 16 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org>