From patchwork Mon Mar 17 16:00:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 26395 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f71.google.com (mail-pb0-f71.google.com [209.85.160.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E2A7C20143 for ; Mon, 17 Mar 2014 16:02:33 +0000 (UTC) Received: by mail-pb0-f71.google.com with SMTP id up15sf14704660pbc.10 for ; Mon, 17 Mar 2014 09:02:33 -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=Uv8lau/1FVEbPF0pMPXigSV0evLhp9Gtully2bneThE=; b=kV6t4bfc3vgdhuK37jZ0mSe5WxhGR3XKq3glH/Mrn//wtJocG/W+qd7SGg5Py8B5HN CsSiHYNpIbm65JbcDnz8IrQaJjU89xAEY70oOHzm4NGF7KnvXBjz5BMFkhHJNzMMWsmu XYhusdamOqwx5wIBE1oPVipB4XkKe0Q4cwj9f8GDiLC7prD/FjIPt5i7yOJKLd4vheyv T/dNwwJSDK+DzmP4pPY69/m8kaRT/YayzkF1oZwdewHnB4HkTEW8pW9pcg4Qjz0y73X0 m3E/RDC5O2DuGXYoRzSzZiQuw2Q+unVsKTSu/E56et0M1KOkigIDMZvSawSZkKfOoqaK 7pzA== X-Gm-Message-State: ALoCoQl9L2pk8z15S2e/n351WT5aAE/2P4VdqSizZgfUqPi/hGQk2hj2YwZLdU5O5PxfS+tL4qiS X-Received: by 10.66.102.36 with SMTP id fl4mr9283679pab.20.1395072153130; Mon, 17 Mar 2014 09:02:33 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.86.233 with SMTP id p96ls1556277qgd.33.gmail; Mon, 17 Mar 2014 09:02:33 -0700 (PDT) X-Received: by 10.52.134.202 with SMTP id pm10mr132400vdb.55.1395072153015; Mon, 17 Mar 2014 09:02:33 -0700 (PDT) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by mx.google.com with ESMTPS id xn9si5408451vcb.116.2014.03.17.09.02.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Mar 2014 09:02:33 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.176 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.176; Received: by mail-vc0-f176.google.com with SMTP id lc6so5872454vcb.7 for ; Mon, 17 Mar 2014 09:02:32 -0700 (PDT) X-Received: by 10.220.200.6 with SMTP id eu6mr641779vcb.35.1395072152917; Mon, 17 Mar 2014 09:02:32 -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 i9csp137679vck; Mon, 17 Mar 2014 09:02:32 -0700 (PDT) X-Received: by 10.224.137.5 with SMTP id u5mr29638872qat.12.1395072152361; Mon, 17 Mar 2014 09:02:32 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id z2si8827634qad.177.2014.03.17.09.02.32 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 17 Mar 2014 09:02:32 -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]:58738 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPZzj-00081F-Sv for patch@linaro.org; Mon, 17 Mar 2014 12:02:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55971) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPZy5-0005Jp-Pf for qemu-devel@nongnu.org; Mon, 17 Mar 2014 12:00:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WPZxz-0007gu-LW for qemu-devel@nongnu.org; Mon, 17 Mar 2014 12:00:49 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:46882) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPZxz-0007gB-Et; Mon, 17 Mar 2014 12:00:43 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1WPZxx-0004wb-Mo; Mon, 17 Mar 2014 16:00:41 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Date: Mon, 17 Mar 2014 16:00:41 +0000 Message-Id: <1395072041-18911-13-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 12/12] hw/pci-host/apb.c: 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.176 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/pci-host/apb.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/pci-host/apb.c b/hw/pci-host/apb.c index 1b399dd..252caef 100644 --- a/hw/pci-host/apb.c +++ b/hw/pci-host/apb.c @@ -58,11 +58,11 @@ do { printf("APB: " fmt , ## __VA_ARGS__); } while (0) #define PBM_PCI_IMR_MASK 0x7fffffff #define PBM_PCI_IMR_ENABLED 0x80000000 -#define POR (1 << 31) -#define SOFT_POR (1 << 30) -#define SOFT_XIR (1 << 29) -#define BTN_POR (1 << 28) -#define BTN_XIR (1 << 27) +#define POR (1U << 31) +#define SOFT_POR (1U << 30) +#define SOFT_XIR (1U << 29) +#define BTN_POR (1U << 28) +#define BTN_XIR (1U << 27) #define RESET_MASK 0xf8000000 #define RESET_WCMASK 0x98000000 #define RESET_WMASK 0x60000000