From patchwork Mon Mar 10 19:10:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 26008 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f198.google.com (mail-ob0-f198.google.com [209.85.214.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id F28D52055F for ; Mon, 10 Mar 2014 19:26:55 +0000 (UTC) Received: by mail-ob0-f198.google.com with SMTP id wn1sf29550479obc.5 for ; Mon, 10 Mar 2014 12:26:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=/qhIHd4g8diozUxFQoTIKtun2gCflkJA4JFme/Nw6GM=; b=LdO4y1EHu1xhoZJBXNPIHonXEOW/wvU8x8SiSXmvHFLXXDlVyogLIDHu5jSFXeHKZc TK15HqJSjrjml+Fp+H+RGWI9TstOuPLpa2StLqG0UNsWJC654jNYXpNcy0JGBt9zhqEq c7GXG6NKZII1nrBsPdkJyTycdcmPriR4i/ZpIDFAuOAo99kqxSg8o43LW3L4KGscYkUw jBsoTlWFyFM+VIZyP2B5Hp+6ZcDbdseuh0Ok+HeFNsuWsL06ydwMUMFoGJ6QWwX3AwjF aywh5mL4VzgcL2Xfl5v99bf7nuDyEie4PzZNSJmvzYzr2ZSsEQHZisRC8UXOD2P/1icn PeWg== X-Gm-Message-State: ALoCoQlwawBV9J28NnJt/0lJpGinbXu4SgdsEFecfjpNkwGRXsyZkNruILOxgEAWs37AuFu7B4jR X-Received: by 10.182.186.105 with SMTP id fj9mr14957883obc.5.1394479615487; Mon, 10 Mar 2014 12:26:55 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.91.131 with SMTP id z3ls2110011qgd.59.gmail; Mon, 10 Mar 2014 12:26:55 -0700 (PDT) X-Received: by 10.52.65.132 with SMTP id x4mr1604859vds.36.1394479615374; Mon, 10 Mar 2014 12:26:55 -0700 (PDT) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id xj4si5039860vec.132.2014.03.10.12.26.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Mar 2014 12:26:55 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.182 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.182; Received: by mail-vc0-f182.google.com with SMTP id ks9so1515005vcb.41 for ; Mon, 10 Mar 2014 12:26:55 -0700 (PDT) X-Received: by 10.58.185.145 with SMTP id fc17mr285599vec.14.1394479615274; Mon, 10 Mar 2014 12:26:55 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.78.9 with SMTP id i9csp142873vck; Mon, 10 Mar 2014 12:26:54 -0700 (PDT) X-Received: by 10.194.161.195 with SMTP id xu3mr5636150wjb.35.1394479614372; Mon, 10 Mar 2014 12:26:54 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id kq9si3134697wjc.17.2014.03.10.12.26.53 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 10 Mar 2014 12:26:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::1 as permitted sender) client-ip=2001:8b0:1d0::1; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1WN5b7-0002TJ-8y; Mon, 10 Mar 2014 19:10:49 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, qemu-trivial@nongnu.org, qemu-ppc@nongnu.org Subject: [PATCH 06/12] hw/usb/hcd-ohci.c: Avoid shifting left into sign bit Date: Mon, 10 Mar 2014 19:10:42 +0000 Message-Id: <1394478649-9453-7-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1394478649-9453-1-git-send-email-peter.maydell@linaro.org> References: <1394478649-9453-1-git-send-email-peter.maydell@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.182 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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)