]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/usb/xen-usb.c: Pass struct usbback_req* to usbback_packet_complete()
authorPeter Maydell <peter.maydell@linaro.org>
Mon, 23 Mar 2020 16:43:18 +0000 (16:43 +0000)
committerAnthony PERARD <anthony.perard@citrix.com>
Tue, 7 Apr 2020 15:13:26 +0000 (16:13 +0100)
commit1aef27c93d351cf6235dbc06d112f626a9aaeba6
treebf903f69132df5382691b39f0854ea402cfae9e5
parent8f0d25c464a1989d606f7b988d07b1147dfcde33
hw/usb/xen-usb.c: Pass struct usbback_req* to usbback_packet_complete()

The function usbback_packet_complete() currently takes a USBPacket*,
which must be a pointer to the packet field within a struct
usbback_req; the function uses container_of() to get the struct
usbback_req* given the USBPacket*.

This is unnecessarily confusing (and in particular it confuses the
Coverity Scan analysis, resulting in the false positive CID 1421919
where it thinks that we write off the end of the structure). Since
both callsites already have the pointer to the struct usbback_req,
just pass that in directly.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
Message-Id: <20200323164318.26567-1-peter.maydell@linaro.org>
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
hw/usb/xen-usb.c