From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46528) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNKuX-0007ql-Ua for qemu-devel@nongnu.org; Fri, 29 Aug 2014 08:04:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XNKuS-0003XQ-Dw for qemu-devel@nongnu.org; Fri, 29 Aug 2014 08:04:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57084) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNKuS-0003X1-6j for qemu-devel@nongnu.org; Fri, 29 Aug 2014 08:04:04 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s7TC4327032123 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 29 Aug 2014 08:04:03 -0400 From: Gerd Hoffmann Date: Fri, 29 Aug 2014 14:03:39 +0200 Message-Id: <1409313832-2514-5-git-send-email-kraxel@redhat.com> In-Reply-To: <1409313832-2514-1-git-send-email-kraxel@redhat.com> References: <1409313832-2514-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PULL 04/17] xhci: use (1u << i) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Signed-off-by: Gerd Hoffmann Reviewed-by: Peter Maydell --- hw/usb/hcd-xhci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index aed8e9f..f7f9fed 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); } } -- 1.8.3.1