qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 11/17] esp.c: rework esp_cdb_length() into esp_cdb_ready()


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v3 11/17] esp.c: rework esp_cdb_length() into esp_cdb_ready()
Date: Tue, 2 Apr 2024 13:38:30 +0200
User-agent: Mozilla Thunderbird

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 <pbonzini@redhat.com>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
  hw/scsi/esp.c | 30 ++++++++++++++----------------
  1 file changed, 14 insertions(+), 16 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]