Commit 5ab704cd4a for qemu.org
commit 5ab704cd4a3a3a46ac506cbcad4c110e7dbb6294
Author: Emmanuel Blot <emmanuel.blot@free.fr>
Date: Thu Oct 15 11:27:58 2026 +0200
hw/rtc: ds1338: prefix the file-local helpers with ds1338_
Two static helpers predate the rest of the file and carry no device
prefix.
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Emmanuel Blot <emmanuel.blot@free.fr>
Link: https://lore.kernel.org/qemu-devel/20261015-bmc-minerva-v3-11-7d50c8a108e5@free.fr
Signed-off-by: Cédric Le Goater <clg@redhat.com>
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;
}