On Mon, 2 Mar 2026 at 22:03, Bernhard Beschow <[email protected]> wrote: > > There is no need to invoke the reset method in realize since the reset > framework will do so anyway before the machine starts. > > Signed-off-by: Bernhard Beschow <[email protected]> > --- > hw/char/serial.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/hw/char/serial.c b/hw/char/serial.c > index 485b98f03f..0f3469a1e8 100644 > --- a/hw/char/serial.c > +++ b/hw/char/serial.c > @@ -934,7 +934,6 @@ static void serial_realize(DeviceState *dev, Error **errp) > serial_event, serial_be_change, s, NULL, true); > fifo8_create(&s->recv_fifo, UART_FIFO_LENGTH); > fifo8_create(&s->xmit_fifo, UART_FIFO_LENGTH); > - serial_reset(s); > }
Reviewed-by: Peter Maydell <[email protected]> It would be nice to make this not do qemu_register_reset(), though right now because it's a direct subtype of TYPE_DEVICE that would imply having all the devices that directly instantiate TYPE_SERIAL arranging to reset it in their own reset methods. thanks -- PMM
