qemu-patch-raspberry4/hw/usb
Michael Tokarev dcf6f5e15e change iov_* function prototypes to be more appropriate
Reorder arguments to be more natural, readable and
consistent with other iov_* functions, and change
argument names, from:
 iov_from_buf(iov, iov_cnt, buf, iov_off, size)
to
 iov_from_buf(iov, iov_cnt, offset, buf, bytes)

The result becomes natural English:

 copy data to this `iov' vector with `iov_cnt'
 elements starting at byte offset `offset'
 from memory buffer `buf', processing `bytes'
 bytes max.

(Try to read the original prototype this way).

Also change iov_clear() to more general iov_memset()
(it uses memset() internally anyway).

While at it, add comments to the header file
describing what the routines actually does.

The patch only renames argumens in the header, but
keeps old names in the implementation.  The next
patch will touch actual code to match.

Now, it might look wrong to pay so much attention
to so small things.  But we've so many badly designed
interfaces already so the whole thing becomes rather
confusing or error prone.  One example of this is
previous commit and small discussion which emerged
from it, with an outcome that the utility functions
like these aren't well-understdandable, leading to
strange usage cases.  That's why I paid quite some
attention to this set of functions and a few
others in subsequent patches.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2012-06-07 20:43:38 +04:00
..
bus.c usb/vmstate: add parent dev path 2012-04-17 10:23:21 +02:00
core.c change iov_* function prototypes to be more appropriate 2012-06-07 20:43:38 +04:00
desc.c usb: add serial number generator 2012-04-26 12:21:17 +02:00
desc.h usb: add serial number generator 2012-04-26 12:21:17 +02:00
dev-audio.c usb: add serial number generator 2012-04-26 12:21:17 +02:00
dev-bluetooth.c usb: add serial number generator 2012-04-26 12:21:17 +02:00
dev-hid.c usb: the big rename 2012-03-13 10:15:32 +01:00
dev-hub.c usb: add serial number generator 2012-04-26 12:21:17 +02:00
dev-network.c net: net_client_init(): use error_set() 2012-06-04 13:49:35 -03:00
dev-serial.c usb: add serial number generator 2012-04-26 12:21:17 +02:00
dev-smartcard-reader.c usb: add serial number generator 2012-04-26 12:21:17 +02:00
dev-storage.c qemu-option: qemu_opts_create(): use error_set() 2012-06-04 13:49:34 -03:00
dev-wacom.c usb: add serial number generator 2012-04-26 12:21:17 +02:00
hcd-ehci.c fix some common typos 2012-05-14 07:27:24 +02:00
hcd-musb.c usb: the big rename 2012-03-13 10:15:32 +01:00
hcd-ohci.c usb-ohci: DMA writeback bug fixes 2012-03-13 10:15:32 +01:00
hcd-uhci.c usb-uhci: update irq line on reset 2012-04-26 12:21:17 +02:00
hcd-xhci.c usb-xhci: fix bit test 2012-04-26 12:21:16 +02:00
host-bsd.c usb: the big rename 2012-03-13 10:15:32 +01:00
host-linux.c usb-host: handle guest-issued clear halt 2012-05-14 10:22:20 +02:00
host-stub.c usb: the big rename 2012-03-13 10:15:32 +01:00
libhw.c usb: the big rename 2012-03-13 10:15:32 +01:00
redirect.c usb-redir: Not finding an async urb id is not an error 2012-04-26 12:21:17 +02:00