[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/2] hw/isa/superio: Fix inconsistent use of Cha
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 1/2] hw/isa/superio: Fix inconsistent use of Chardev->be |
Date: |
Fri, 20 Apr 2018 15:43:14 +0100 |
On 20 April 2018 at 15:29, Philippe Mathieu-Daudé <address@hidden> wrote:
>>>> On 04/20/2018 05:43 AM, Peter Maydell wrote:
>>>> Since we can now safely call serial_mm_init(..., chr=NULL, ...), I'll
>>>> work on simplifying and fixing this.
>>>
>>> Correct. There are a bunch of dubious workarounds in the
>>> codebase which try to handle the problem at different levels,
>>> but we've decided that the right thing is for the NULL pointer
>>> to be dealt with in one place at the bottom (in the qemu_chr_fe_*
>>> functions).
>>
>> OK, I'll happily clean that :)
>
> Hmmm removing the "if (serial_hds[0])" check I reach:
>
> void serial_realize_core(SerialState *s, Error **errp)
> {
> if (!qemu_chr_fe_backend_connected(&s->chr)) {
> error_setg(errp, "Can't create serial device, empty char device");
> return;
> }
Yeah. That check is unnecessary; nothing fails to work if it is
removed. I've got a patch deleting it in my "drop MAX_SERIAL_PORTS"
series.
thanks
-- PMM
- [Qemu-devel] [PATCH 0/2] hw/superio: Fix inconsistent use of Chardev->be, Philippe Mathieu-Daudé, 2018/04/19
- [Qemu-devel] [PATCH 1/2] hw/isa/superio: Fix inconsistent use of Chardev->be, Philippe Mathieu-Daudé, 2018/04/19
- Re: [Qemu-devel] [PATCH 1/2] hw/isa/superio: Fix inconsistent use of Chardev->be, Peter Maydell, 2018/04/20
- Re: [Qemu-devel] [PATCH 1/2] hw/isa/superio: Fix inconsistent use of Chardev->be, Philippe Mathieu-Daudé, 2018/04/20
- Re: [Qemu-devel] [PATCH 1/2] hw/isa/superio: Fix inconsistent use of Chardev->be, Peter Maydell, 2018/04/20
- Re: [Qemu-devel] [PATCH 1/2] hw/isa/superio: Fix inconsistent use of Chardev->be, Philippe Mathieu-Daudé, 2018/04/20
- Re: [Qemu-devel] [PATCH 1/2] hw/isa/superio: Fix inconsistent use of Chardev->be, Peter Maydell, 2018/04/20
- Re: [Qemu-devel] [PATCH 1/2] hw/isa/superio: Fix inconsistent use of Chardev->be, Philippe Mathieu-Daudé, 2018/04/20
- Re: [Qemu-devel] [PATCH 1/2] hw/isa/superio: Fix inconsistent use of Chardev->be,
Peter Maydell <=
[Qemu-devel] [PATCH 2/2] Revert "Revert "mux: fix ctrl-a b again"" again, Philippe Mathieu-Daudé, 2018/04/19