From: Pekka Enberg Date: Tue, 4 Jan 2011 15:14:56 +0000 (+0200) Subject: kvm: Cleanup virtio block device I/O functions X-Git-Tag: next-20110824~3^2~528^2~42 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=20f9d0587a67cf05a202138e74c4e7127b4cbc5a;p=karo-tx-linux.git kvm: Cleanup virtio block device I/O functions Signed-off-by: Pekka Enberg --- diff --git a/tools/kvm/blk-virtio.c b/tools/kvm/blk-virtio.c index 10dbfa23394b..c1274e951e78 100644 --- a/tools/kvm/blk-virtio.c +++ b/tools/kvm/blk-virtio.c @@ -53,7 +53,7 @@ static bool blk_virtio_in(struct kvm *self, uint16_t port, void *data, int size, case VIRTIO_PCI_ISR: ioport__write8(data, 0x1); kvm__irq_line(self, VIRTIO_BLK_IRQ, 0); - return true; + break; case VIRTIO_MSI_CONFIG_VECTOR: default: return false; @@ -77,13 +77,12 @@ static bool blk_virtio_out(struct kvm *self, uint16_t port, void *data, int size device.guest_features = ioport__read32(data); break; case VIRTIO_PCI_QUEUE_PFN: - return true; + break; case VIRTIO_PCI_QUEUE_SEL: - return true; - case VIRTIO_PCI_QUEUE_NOTIFY: { + break; + case VIRTIO_PCI_QUEUE_NOTIFY: kvm__irq_line(self, VIRTIO_BLK_IRQ, 1); - return true; - } + break; case VIRTIO_PCI_STATUS: device.status = ioport__read8(data); break;