From patchwork Mon Mar 10 19:10:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 26005 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f72.google.com (mail-yh0-f72.google.com [209.85.213.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B1A6D2054B for ; Mon, 10 Mar 2014 19:12:07 +0000 (UTC) Received: by mail-yh0-f72.google.com with SMTP id f10sf8484453yha.11 for ; Mon, 10 Mar 2014 12:12:07 -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:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=4r2TeQuWSsxzvL1FQoazBZWitH52Gakggl5eFw57rH0=; b=QsOrS4LpG+ONplBoI7wj5tBodHKVuxmJPtMR1DjX0lw/k+YV+JyflObLmcfs32BW8b mF8U6HQpRu3a3yG7jp6rHP39SRwsnTjYZjOtmXwvyWB1pwWiYrBB3K/pHLSIhvalxTEi 9zKoZfiyAEqMueclAJObsmk2oLN1h9e46myAuuUwtdYZ7C536ayK5SBK7P2+TQghv6T8 Qf/r5fXyIupXcXvQ8GMD7O8F1u1+JhYOizISyG+a44WbT6OqE7FXhIdochtf8JzO9JRt 3aOyLW/Qt/HML4wPRgytcmhqpUGGiDbmBW9GPAbJelGgGZBsdaqq2/L9hD/dwaniqnxE H8ow== X-Gm-Message-State: ALoCoQk8+hgTCFZ05XxrjEMJH9JejZ75IsDWr7ZhAhAXcnYQOfkDuGJ5BZc4VULseXR8J5+FwSjT X-Received: by 10.236.94.48 with SMTP id m36mr13483456yhf.47.1394478726956; Mon, 10 Mar 2014 12:12:06 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.104.142 with SMTP id a14ls2257480qgf.31.gmail; Mon, 10 Mar 2014 12:12:06 -0700 (PDT) X-Received: by 10.52.171.68 with SMTP id as4mr23727685vdc.0.1394478726706; Mon, 10 Mar 2014 12:12:06 -0700 (PDT) Received: from mail-ve0-f173.google.com (mail-ve0-f173.google.com [209.85.128.173]) by mx.google.com with ESMTPS id tz5si5694799vdc.124.2014.03.10.12.12.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Mar 2014 12:12:06 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.173; Received: by mail-ve0-f173.google.com with SMTP id oy12so7463183veb.18 for ; Mon, 10 Mar 2014 12:12:06 -0700 (PDT) X-Received: by 10.221.37.1 with SMTP id tc1mr1601709vcb.32.1394478726642; Mon, 10 Mar 2014 12:12:06 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.78.9 with SMTP id i9csp142042vck; Mon, 10 Mar 2014 12:12:06 -0700 (PDT) X-Received: by 10.224.88.130 with SMTP id a2mr33140217qam.55.1394478726241; Mon, 10 Mar 2014 12:12:06 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [208.118.235.17]) by mx.google.com with ESMTPS id d69si8207340qga.130.2014.03.10.12.12.06 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 10 Mar 2014 12:12:06 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; Received: from localhost ([::1]:50744 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WN5cL-0006DE-PT for patch@linaro.org; Mon, 10 Mar 2014 15:12:05 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57163) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WN5bH-0004mw-BK for qemu-devel@nongnu.org; Mon, 10 Mar 2014 15:11:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WN5bC-0003Ki-0Y for qemu-devel@nongnu.org; Mon, 10 Mar 2014 15:10:59 -0400 Received: from mnementh.archaic.org.uk ([81.2.115.146]:39685) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WN5bB-0003JX-Q9; Mon, 10 Mar 2014 15:10:53 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1WN5b7-0002TN-A8; Mon, 10 Mar 2014 19:10:49 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Date: Mon, 10 Mar 2014 19:10:43 +0000 Message-Id: <1394478649-9453-8-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-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 81.2.115.146 Cc: qemu-trivial@nongnu.org, qemu-ppc@nongnu.org, patches@linaro.org Subject: [Qemu-devel] [PATCH 07/12] hw/intc/openpic: Avoid shifting left into sign bit X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.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.128.173 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 Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Add U suffix to avoid undefined behaviour. Signed-off-by: Peter Maydell --- hw/intc/openpic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/intc/openpic.c b/hw/intc/openpic.c index 7df72f4..cfd7f06 100644 --- a/hw/intc/openpic.c +++ b/hw/intc/openpic.c @@ -123,7 +123,7 @@ static FslMpicInfo fsl_mpic_42 = { #define TCCR_TOG 0x80000000 /* toggles when decrement to zero */ #define IDR_EP_SHIFT 31 -#define IDR_EP_MASK (1 << IDR_EP_SHIFT) +#define IDR_EP_MASK (1U << IDR_EP_SHIFT) #define IDR_CI0_SHIFT 30 #define IDR_CI1_SHIFT 29 #define IDR_P1_SHIFT 1 @@ -220,7 +220,7 @@ typedef struct IRQSource { } IRQSource; #define IVPR_MASK_SHIFT 31 -#define IVPR_MASK_MASK (1 << IVPR_MASK_SHIFT) +#define IVPR_MASK_MASK (1U << IVPR_MASK_SHIFT) #define IVPR_ACTIVITY_SHIFT 30 #define IVPR_ACTIVITY_MASK (1 << IVPR_ACTIVITY_SHIFT) #define IVPR_MODE_SHIFT 29