summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MAINTAINERS1
-rw-r--r--hw/block/xen-block.c2
-rw-r--r--hw/usb/xen-usb.c10
3 files changed, 6 insertions, 7 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index 9d156d73b3..839959f7e4 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -440,6 +440,7 @@ F: hw/9pfs/xen-9p*
F: hw/char/xen_console.c
F: hw/display/xenfb.c
F: hw/net/xen_nic.c
+F: hw/usb/xen-usb.c
F: hw/block/xen*
F: hw/block/dataplane/xen*
F: hw/xen/
diff --git a/hw/block/xen-block.c b/hw/block/xen-block.c
index 07bb32e22b..99cb4c67cb 100644
--- a/hw/block/xen-block.c
+++ b/hw/block/xen-block.c
@@ -860,7 +860,7 @@ static XenBlockIOThread *xen_block_iothread_create(const char *id,
XenBlockIOThread *iothread = g_new(XenBlockIOThread, 1);
Error *local_err = NULL;
QDict *opts;
- QObject *ret_data;
+ QObject *ret_data = NULL;
iothread->id = g_strdup(id);
diff --git a/hw/usb/xen-usb.c b/hw/usb/xen-usb.c
index 1fc2f32ce9..961190d0f7 100644
--- a/hw/usb/xen-usb.c
+++ b/hw/usb/xen-usb.c
@@ -347,13 +347,11 @@ static int32_t usbback_xlat_status(int status)
return -ESHUTDOWN;
}
-static void usbback_packet_complete(USBPacket *packet)
+static void usbback_packet_complete(struct usbback_req *usbback_req)
{
- struct usbback_req *usbback_req;
+ USBPacket *packet = &usbback_req->packet;
int32_t status;
- usbback_req = container_of(packet, struct usbback_req, packet);
-
QTAILQ_REMOVE(&usbback_req->stub->submit_q, usbback_req, q);
status = usbback_xlat_status(packet->status);
@@ -566,7 +564,7 @@ static void usbback_dispatch(struct usbback_req *usbback_req)
usb_handle_packet(usbback_req->stub->dev, &usbback_req->packet);
if (usbback_req->packet.status != USB_RET_ASYNC) {
- usbback_packet_complete(&usbback_req->packet);
+ usbback_packet_complete(usbback_req);
}
return;
@@ -993,7 +991,7 @@ static void xen_bus_complete(USBPort *port, USBPacket *packet)
usbif = usbback_req->usbif;
TR_REQ(&usbif->xendev, "\n");
- usbback_packet_complete(packet);
+ usbback_packet_complete(usbback_req);
}
static USBPortOps xen_usb_port_ops = {