qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Daniel P . Berrangé" <berrange@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>
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	[thread overview]
Message-ID: <CAFEAcA828qK5DJy8yqO=d8LyaPthVb_qj3VQBZh_rY40TeZotg@mail.gmail.com> (raw)
In-Reply-To: <ab476982-0aee-7471-daa2-99f774f43089@amsat.org>

On 20 April 2018 at 15:29, Philippe Mathieu-Daudé <f4bug@amsat.org> 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

  reply	other threads:[~2018-04-20 14:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-19 22:09 [Qemu-devel] [PATCH 0/2] hw/superio: Fix inconsistent use of Chardev->be Philippe Mathieu-Daudé
2018-04-19 22:09 ` [Qemu-devel] [PATCH 1/2] hw/isa/superio: " Philippe Mathieu-Daudé
2018-04-20  8:43   ` Peter Maydell
2018-04-20 12:39     ` Philippe Mathieu-Daudé
2018-04-20 12:59       ` Peter Maydell
2018-04-20 13:04         ` Philippe Mathieu-Daudé
2018-04-20 14:00           ` Peter Maydell
2018-04-20 14:29           ` Philippe Mathieu-Daudé
2018-04-20 14:43             ` Peter Maydell [this message]
2018-04-19 22:09 ` [Qemu-devel] [PATCH 2/2] Revert "Revert "mux: fix ctrl-a b again"" again Philippe Mathieu-Daudé
2018-04-19 22:12   ` Marc-André Lureau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFEAcA828qK5DJy8yqO=d8LyaPthVb_qj3VQBZh_rY40TeZotg@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=berrange@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=marcandre.lureau@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).