From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Paolo Bonzini" <pbonzini@redhat.com>
Cc: "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
qemu-devel@nongnu.org,
"Daniel P . Berrangé" <berrange@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: [Qemu-devel] [PATCH 1/2] hw/isa/superio: Fix inconsistent use of Chardev->be
Date: Thu, 19 Apr 2018 19:09:13 -0300 [thread overview]
Message-ID: <20180419220914.959-2-f4bug@amsat.org> (raw)
In-Reply-To: <20180419220914.959-1-f4bug@amsat.org>
4c3119a6e3e and cd9526ab7c0 introduced an incorrect and inconsistent
use of Chardev->be. Also, this CharBackend member is private and is
not supposed to be accessible.
Fix it by removing the inconsistent check.
Reported-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/isa/isa-superio.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/isa/isa-superio.c b/hw/isa/isa-superio.c
index b95608a003..08afe44731 100644
--- a/hw/isa/isa-superio.c
+++ b/hw/isa/isa-superio.c
@@ -43,7 +43,7 @@ static void isa_superio_realize(DeviceState *dev, Error **errp)
if (!k->parallel.is_enabled || k->parallel.is_enabled(sio, i)) {
/* FIXME use a qdev chardev prop instead of parallel_hds[] */
chr = parallel_hds[i];
- if (chr == NULL || chr->be) {
+ if (chr == NULL) {
name = g_strdup_printf("discarding-parallel%d", i);
chr = qemu_chr_new(name, "null");
} else {
@@ -83,7 +83,7 @@ static void isa_superio_realize(DeviceState *dev, Error **errp)
if (!k->serial.is_enabled || k->serial.is_enabled(sio, i)) {
/* FIXME use a qdev chardev prop instead of serial_hds[] */
chr = serial_hds[i];
- if (chr == NULL || chr->be) {
+ if (chr == NULL) {
name = g_strdup_printf("discarding-serial%d", i);
chr = qemu_chr_new(name, "null");
} else {
--
2.17.0
next prev parent reply other threads:[~2018-04-19 22:09 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 ` Philippe Mathieu-Daudé [this message]
2018-04-20 8:43 ` [Qemu-devel] [PATCH 1/2] hw/isa/superio: " 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
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=20180419220914.959-2-f4bug@amsat.org \
--to=f4bug@amsat.org \
--cc=berrange@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--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).