mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-06 17:21:22 +00:00
DM USB: introduce helper functions: index_inc and index_valid
Introduce helper functions to make code shorter and cleaner. Tracked-On: #3628 Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com> Acked-by: Yu Wang <yu1.wang@intel.com>
This commit is contained in:
@@ -118,7 +118,7 @@ usb_block_append(struct usb_xfer *xfer, void *buf, int blen,
|
||||
xb->bdone = 0;
|
||||
xb->type = USB_DATA_NONE;
|
||||
xfer->ndata++;
|
||||
xfer->tail = (xfer->tail + 1) % USB_MAX_XFER_BLOCKS;
|
||||
xfer->tail = index_inc(xfer->tail, USB_MAX_XFER_BLOCKS);
|
||||
return xb;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user