From patchwork Mon Mar 17 16:00:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 26397 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f71.google.com (mail-oa0-f71.google.com [209.85.219.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 89B6520143 for ; Mon, 17 Mar 2014 16:16:43 +0000 (UTC) Received: by mail-oa0-f71.google.com with SMTP id j17sf23802168oag.2 for ; Mon, 17 Mar 2014 09:16:43 -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=XvEjEH+t87fflFX3p2Tsk+A78grdsyjRh3Kt9Ip0HsE=; b=AeXS9serWOWrfX526M2R23cXzHY1se6p83cNUdiDvpTNzaW3SwIRPdZHKCFwV662NZ 5SKqURa8vKPt0Qi3wecOzbfAP69ZeFr73gMgCf1nq9G1NpWW+m+/4ssuCn65XK6GPKIb AncHOfaQ/AVohCYEGXpdek93BLDsZqxziYT5qdiVj81OfXGeNVlFouQItuu76wREzF6m jgxQFY8vNgTKQLJN7wcQQ8eR2crh775wjo0C7Rn1Y53fjHhAWoDrmS0KAEdfySz1TWjG bhmQVBY9hezXTkiWJBobikD9KxnH/4xAPakUbkZwzXnC4XSL8kjNyVlSjqryYAGASKgv wrjQ== X-Gm-Message-State: ALoCoQnAUPOs1Zp3aSUz9bc7wVgn/iT2WTx46bTQtw0V8byR/lYbgaHGhAlOZcr7a3R65/ig0Pwl X-Received: by 10.182.251.230 with SMTP id zn6mr9473813obc.14.1395073003025; Mon, 17 Mar 2014 09:16:43 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.106.165 with SMTP id e34ls1735130qgf.29.gmail; Mon, 17 Mar 2014 09:16:42 -0700 (PDT) X-Received: by 10.220.247.68 with SMTP id mb4mr418521vcb.37.1395073002920; Mon, 17 Mar 2014 09:16:42 -0700 (PDT) Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by mx.google.com with ESMTPS id xt2si5438706vcb.33.2014.03.17.09.16.42 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Mar 2014 09:16:42 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.179 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.179; Received: by mail-vc0-f179.google.com with SMTP id ij19so6141459vcb.10 for ; Mon, 17 Mar 2014 09:16:42 -0700 (PDT) X-Received: by 10.221.26.10 with SMTP id rk10mr20694250vcb.0.1395073002834; Mon, 17 Mar 2014 09:16:42 -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 i9csp138707vck; Mon, 17 Mar 2014 09:16:42 -0700 (PDT) X-Received: by 10.140.107.138 with SMTP id h10mr27490448qgf.30.1395073002424; Mon, 17 Mar 2014 09:16:42 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 50si8874286qgh.177.2014.03.17.09.16.42 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 17 Mar 2014 09:16:42 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:58739 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPZzl-00083f-DC for patch@linaro.org; Mon, 17 Mar 2014 12:02:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55873) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPZy3-0005EL-I2 for qemu-devel@nongnu.org; Mon, 17 Mar 2014 12:00:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WPZy1-0007hU-9U for qemu-devel@nongnu.org; Mon, 17 Mar 2014 12:00:47 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:46882) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPZy0-0007gB-VT; Mon, 17 Mar 2014 12:00:45 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1WPZxx-0004wP-JM; Mon, 17 Mar 2014 16:00:41 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Date: Mon, 17 Mar 2014 16:00:39 +0000 Message-Id: <1395072041-18911-11-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1395072041-18911-1-git-send-email-peter.maydell@linaro.org> References: <1395072041-18911-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Cc: qemu-trivial@nongnu.org, qemu-ppc@nongnu.org, patches@linaro.org Subject: [Qemu-devel] [PATCH v2 10/12] hw/intc/slavio_intctl: 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.220.179 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/slavio_intctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/intc/slavio_intctl.c b/hw/intc/slavio_intctl.c index 41a1672..b10fb66 100644 --- a/hw/intc/slavio_intctl.c +++ b/hw/intc/slavio_intctl.c @@ -272,7 +272,7 @@ static void slavio_check_interrupts(SLAVIO_INTCTLState *s, int set_irqs) CPU_IRQ_TIMER_IN; if (i == s->target_cpu) { for (j = 0; j < 32; j++) { - if ((s->intregm_pending & (1 << j)) && intbit_to_level[j]) { + if ((s->intregm_pending & (1U << j)) && intbit_to_level[j]) { s->slaves[i].intreg_pending |= 1 << intbit_to_level[j]; } }