[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL (resend, rebase) 4/5] virtio-serial-bus: Simplify han
From: |
Amit Shah |
Subject: |
[Qemu-devel] [PULL (resend, rebase) 4/5] virtio-serial-bus: Simplify handle_output() function |
Date: |
Thu, 10 Mar 2011 11:39:18 +0530 |
There's no code change, just re-arrangement to simplify the function
after recent modifications.
Reported-by: Juan Quintela <address@hidden>
Signed-off-by: Amit Shah <address@hidden>
---
hw/virtio-serial-bus.c | 12 +++---------
1 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c
index c6feb43..a82fbe9 100644
--- a/hw/virtio-serial-bus.c
+++ b/hw/virtio-serial-bus.c
@@ -442,25 +442,19 @@ static void handle_output(VirtIODevice *vdev, VirtQueue
*vq)
{
VirtIOSerial *vser;
VirtIOSerialPort *port;
- bool discard;
vser = DO_UPCAST(VirtIOSerial, vdev, vdev);
port = find_port_by_vq(vser, vq);
- discard = false;
if (!port || !port->host_connected || !port->info->have_data) {
- discard = true;
- }
-
- if (discard) {
discard_vq_data(vq, vdev);
return;
}
- if (port->throttled) {
+
+ if (!port->throttled) {
+ do_flush_queued_data(port, vq, vdev);
return;
}
-
- do_flush_queued_data(port, vq, vdev);
}
static void handle_input(VirtIODevice *vdev, VirtQueue *vq)
--
1.7.4
- [Qemu-devel] [PULL (resend, rebase) 0/5] virtio-serial fixes, Amit Shah, 2011/03/10
- [Qemu-devel] [PULL (resend, rebase) 1/5] virtio-serial: Use a struct to pass config information from proxy, Amit Shah, 2011/03/10
- [Qemu-devel] [PULL (resend, rebase) 3/5] virtio-serial: Enable ioeventfd, Amit Shah, 2011/03/10
- [Qemu-devel] [PULL (resend, rebase) 2/5] virtio-serial: Disallow generic ports at id 0, Amit Shah, 2011/03/10
- [Qemu-devel] [PULL (resend, rebase) 4/5] virtio-serial-bus: Simplify handle_output() function,
Amit Shah <=
- [Qemu-devel] [PULL (resend, rebase) 5/5] virtio-serial: Don't clear ->have_data() pointer after unplug, Amit Shah, 2011/03/10