summary refs log tree commit diff stats
path: root/hw/scsi/esp.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2024-07-22 13:25:01 +0200
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2024-07-23 22:34:54 +0200
commit06252bf5122f047ed5c14fb75f3167f11b882352 (patch)
treee952ab6e63bee8853a3a7d0be336208a46ce9c74 /hw/scsi/esp.c
parent06a16e7ba98438087b8806bad0ddf094380892a9 (diff)
downloadfocaccia-qemu-06252bf5122f047ed5c14fb75f3167f11b882352.tar.gz
focaccia-qemu-06252bf5122f047ed5c14fb75f3167f11b882352.zip
util/fifo8: Rename fifo8_pop_buf() -> fifo8_pop_bufptr()
Since fifo8_pop_buf() return a const buffer (which points
directly into the FIFO backing store). Rename it using the
'bufptr' suffix to better reflect that it is a pointer to
the internal buffer that is being returned. This will help
differentiate with methods *copying* the FIFO data.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20240722160745.67904-6-philmd@linaro.org>
Diffstat (limited to 'hw/scsi/esp.c')
-rw-r--r--hw/scsi/esp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c
index 412c8cf226..7e9657e9c3 100644
--- a/hw/scsi/esp.c
+++ b/hw/scsi/esp.c
@@ -208,7 +208,7 @@ static uint32_t esp_fifo8_pop_buf(Fifo8 *fifo, uint8_t *dest, int maxlen)
     }
 
     len = maxlen;
-    buf = fifo8_pop_buf(fifo, len, &n);
+    buf = fifo8_pop_bufptr(fifo, len, &n);
     if (dest) {
         memcpy(dest, buf, n);
     }
@@ -217,7 +217,7 @@ static uint32_t esp_fifo8_pop_buf(Fifo8 *fifo, uint8_t *dest, int maxlen)
     len -= n;
     len = MIN(len, fifo8_num_used(fifo));
     if (len) {
-        buf = fifo8_pop_buf(fifo, len, &n2);
+        buf = fifo8_pop_bufptr(fifo, len, &n2);
         if (dest) {
             memcpy(&dest[n], buf, n2);
         }