On 10/12/26 16:32, Emmanuel Blot wrote:
Two static helpers predate the rest of the file and carry no device
prefix.

Signed-off-by: Emmanuel Blot <[email protected]>
---
  hw/rtc/ds1338.c | 12 ++++++------
  1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/hw/rtc/ds1338.c b/hw/rtc/ds1338.c
index 74aee6c746..1755a3a37c 100644
--- a/hw/rtc/ds1338.c
+++ b/hw/rtc/ds1338.c
@@ -57,7 +57,7 @@ static const VMStateDescription vmstate_ds1338 = {
      }
  };
-static void capture_current_time(DS1338State *s)
+static void ds1338_capture_current_time(DS1338State *s)
  {
      /* Capture the current time into the secondary registers
       * which will be actually read by the data transfer operation.
@@ -85,7 +85,7 @@ static void capture_current_time(DS1338State *s)
      s->nvram[6] = to_bcd(now.tm_year - 100);
  }
-static void inc_regptr(DS1338State *s)
+static void ds1338_inc_regptr(DS1338State *s)
  {
      /* The register pointer wraps around after 0x3F; wraparound
       * causes the current time/date to be retransferred into
@@ -93,7 +93,7 @@ static void inc_regptr(DS1338State *s)
       */
      s->ptr = (s->ptr + 1) & (NVRAM_SIZE - 1);
      if (!s->ptr) {
-        capture_current_time(s);
+        ds1338_capture_current_time(s);
      }
  }
@@ -108,7 +108,7 @@ static int ds1338_event(I2CSlave *i2c, enum i2c_event event)
           * START_SEND, because the guest can't get at that data
           * without going through a START_RECV which would overwrite it.
           */
-        capture_current_time(s);
+        ds1338_capture_current_time(s);
          break;
      case I2C_START_SEND:
          s->addr_byte = true;
@@ -129,7 +129,7 @@ static uint8_t ds1338_recv(I2CSlave *i2c)
trace_ds1338_recv(s->ptr, res); - inc_regptr(s);
+    ds1338_inc_regptr(s);
      return res;
  }
@@ -204,7 +204,7 @@ static int ds1338_send(I2CSlave *i2c, uint8_t data)
      } else {
          s->nvram[s->ptr] = data;
      }
-    inc_regptr(s);
+    ds1338_inc_regptr(s);
      return 0;
  }

Reviewed-by: Cédric Le Goater <[email protected]>

Thanks,

C.


Reply via email to