From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57070) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WN5bD-0004hJ-8W for qemu-devel@nongnu.org; Mon, 10 Mar 2014 15:10:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WN5bB-0003KO-Cs for qemu-devel@nongnu.org; Mon, 10 Mar 2014 15:10:55 -0400 From: Peter Maydell Date: Mon, 10 Mar 2014 19:10:42 +0000 Message-Id: <1394478649-9453-7-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1394478649-9453-1-git-send-email-peter.maydell@linaro.org> References: <1394478649-9453-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH 06/12] hw/usb/hcd-ohci.c: Avoid shifting left into sign bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, qemu-ppc@nongnu.org, patches@linaro.org Add U suffix to avoid undefined behaviour. Signed-off-by: Peter Maydell --- hw/usb/hcd-ohci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) -- 1.9.0