diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2014-08-28 10:51:35 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2014-08-29 12:51:43 +0200 |
commit | 3d80365b5558eb1b0a8374362c41570c37a4aba9 (patch) | |
tree | 833f61f2650edae69f9a0ed5bf7db0d284d4163b /hw/usb | |
parent | cae7f29c47dee0bd0474fa7f1dda28b115a34d33 (diff) |
xhci: use (1u << i)
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/usb')
-rw-r--r-- | hw/usb/hcd-xhci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index aed8e9f18d..f7f9fed737 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -1180,7 +1180,7 @@ static int xhci_epmask_to_eps_with_streams(XHCIState *xhci, slot = &xhci->slots[slotid - 1]; for (i = 2, j = 0; i <= 31; i++) { - if (!(epmask & (1 << i))) { + if (!(epmask & (1u << i))) { continue; } @@ -2465,7 +2465,7 @@ static TRBCCode xhci_configure_slot(XHCIState *xhci, unsigned int slotid, res = xhci_alloc_device_streams(xhci, slotid, ictl_ctx[1]); if (res != CC_SUCCESS) { for (i = 2; i <= 31; i++) { - if (ictl_ctx[1] & (1 << i)) { + if (ictl_ctx[1] & (1u << i)) { xhci_disable_ep(xhci, slotid, i); } } |