@samitouri / QOSamiQemu / commits / 12ef587e2a

hw/char/serial: Avoid implicit conversion when tracing

On 64 bit targets, the MemoryRegion API passes an address and a value as uint64_t, so use that for tracing. Keep the uint8_t for reading since this is what the device model produces. On targets with less than 64 bits, uint64_t is wide enough to avoid narrowing. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Bernhard Beschow <shentey@gmail.com> Message-ID: <20260305220911.131508-12-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>

Bernhard Beschow committed Mar 5, 2026 at 23:09 UTC 12ef587e2a417c80ee8fda6e8a8ba513f0537671
1 file changed +2 -2
hw/char/trace-events
+2 -2
@@ -5,8 +5,8 @@ parallel_ioport_read(const char *desc, uint16_t addr, uint8_t value) "read [%s]
5 parallel_ioport_write(const char *desc, uint16_t addr, uint8_t value) "write [%s] addr 0x%02x val 0x%02x"
6
7 # serial.c
8 -serial_read(uint16_t addr, uint8_t value) "read addr 0x%02x val 0x%02x"
9 -serial_write(uint16_t addr, uint8_t value) "write addr 0x%02x val 0x%02x"
8 +serial_read(uint64_t addr, uint8_t value) "[0x%02" PRIx64 "] -> 0x%02" PRIx8
9 +serial_write(uint64_t addr, uint64_t value) "[0x%02" PRIx64 "] <- 0x%02" PRIx64
10 serial_update_parameters(uint64_t baudrate, char parity, int data_bits, int stop_bits) "baudrate=%"PRIu64" parity='%c' data=%d stop=%d"
11
12 # virtio-serial-bus.c