diff mbox

[06/12] hw/usb/hcd-ohci.c: Avoid shifting left into sign bit

Message ID 1394478649-9453-7-git-send-email-peter.maydell@linaro.org
State New
Headers show

Commit Message

Peter Maydell March 10, 2014, 7:10 p.m. UTC
Add U suffix to avoid undefined behaviour.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 hw/usb/hcd-ohci.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c
index 3d35058b..9dcfb99 100644
--- a/hw/usb/hcd-ohci.c
+++ b/hw/usb/hcd-ohci.c
@@ -242,7 +242,7 @@  struct ohci_iso_td {
 #define OHCI_INTR_FNO         (1<<5) /* Frame number overflow */
 #define OHCI_INTR_RHSC        (1<<6) /* Root hub status change */
 #define OHCI_INTR_OC          (1<<30) /* Ownership change */
-#define OHCI_INTR_MIE         (1<<31) /* Master Interrupt Enable */
+#define OHCI_INTR_MIE         (1U<<31) /* Master Interrupt Enable */
 
 #define OHCI_HCCA_SIZE        0x100
 #define OHCI_HCCA_MASK        0xffffff00
@@ -253,7 +253,7 @@  struct ohci_iso_td {
 #define OHCI_FMI_FSMPS        0xffff0000
 #define OHCI_FMI_FIT          0x80000000
 
-#define OHCI_FR_RT            (1<<31)
+#define OHCI_FR_RT            (1U<<31)
 
 #define OHCI_LS_THRESH        0x628
 
@@ -270,7 +270,7 @@  struct ohci_iso_td {
 #define OHCI_RHS_DRWE         (1<<15)
 #define OHCI_RHS_LPSC         (1<<16)
 #define OHCI_RHS_OCIC         (1<<17)
-#define OHCI_RHS_CRWE         (1<<31)
+#define OHCI_RHS_CRWE         (1U<<31)
 
 #define OHCI_PORT_CCS         (1<<0)
 #define OHCI_PORT_PES         (1<<1)