On 4/1/21 9:49 AM, Mark Cave-Ayland wrote: > Each FIFO currently has its own pop functions with the only difference being > the capacity check. The original reason for this was that the fifo8 > implementation doesn't have a formal API for retrieving the FIFO capacity, > however there are multiple examples within QEMU where the capacity field is > accessed directly. > > Change esp_fifo_pop() to access the FIFO capacity directly and then > consolidate > esp_cmdfifo_pop() into esp_fifo_pop(). > > Signed-off-by: Mark Cave-Ayland <mark.cave-ayl...@ilande.co.uk> > --- > hw/scsi/esp.c | 21 ++++++--------------- > 1 file changed, 6 insertions(+), 15 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org>