From patchwork Thu Mar 27 15:28:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 27215 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f197.google.com (mail-pd0-f197.google.com [209.85.192.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D02822057C for ; Thu, 27 Mar 2014 15:50:38 +0000 (UTC) Received: by mail-pd0-f197.google.com with SMTP id fp1sf8193810pdb.4 for ; Thu, 27 Mar 2014 08:50:38 -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=jPalMDzjBSJL5IXVNuMQ5/tkHG1/x3QWnlGj1KBrKUY=; b=eR1Ngi1Fan4i0XTCSDeqYkKtbDWOaMcT6JZBEEUBuG4VFUdH5ouEL50Y2n+TtIX8vr xfoJ4MB9leZH6bEQI+b6szPT+y1jrZOZXwuIDnNd842Md93bWDpX2Q3M2VYyHnNwsuUu wFGpH3gg67Py85MVcAZPDkYaCyo8Fmow87RbGUf5zk6zVMuLUEh/T1xsg76xRvpoiNPJ T+RmhtAk853mZ5QIMKAeFux84ym98K+BL2tvF4nS2CO1BFnOxtW4o80tPJod0ioB/siQ YiPkeSmi8sbsFrdaR+8EaDqHXxOhuNeHgTU67hGVQZrpdQNcQCbn5quJCcuk4inJhqRs 1oUg== X-Gm-Message-State: ALoCoQlCroi7mXpaTJFSKSE6DYasiQYSr46LfPu/NxDANkIff3cG+fQ0ThmJV3xmC8bKiuLwAE0O X-Received: by 10.66.145.105 with SMTP id st9mr1058876pab.23.1395935438084; Thu, 27 Mar 2014 08:50:38 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.80.145 with SMTP id c17ls1220702qgd.60.gmail; Thu, 27 Mar 2014 08:50:37 -0700 (PDT) X-Received: by 10.52.249.105 with SMTP id yt9mr762917vdc.34.1395935437898; Thu, 27 Mar 2014 08:50:37 -0700 (PDT) Received: from mail-ve0-f170.google.com (mail-ve0-f170.google.com [209.85.128.170]) by mx.google.com with ESMTPS id j5si636201veb.129.2014.03.27.08.50.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 27 Mar 2014 08:50:37 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.170 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.170; Received: by mail-ve0-f170.google.com with SMTP id pa12so4405379veb.1 for ; Thu, 27 Mar 2014 08:50:37 -0700 (PDT) X-Received: by 10.221.34.7 with SMTP id sq7mr2044296vcb.5.1395935437829; Thu, 27 Mar 2014 08:50:37 -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 i9csp38859vck; Thu, 27 Mar 2014 08:50:37 -0700 (PDT) X-Received: by 10.224.20.7 with SMTP id d7mr3038890qab.86.1395935436417; Thu, 27 Mar 2014 08:50:36 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id k4si1209815qci.67.2014.03.27.08.50.36 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 27 Mar 2014 08:50:36 -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]:54478 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTCZg-0005CZ-3D for patch@linaro.org; Thu, 27 Mar 2014 11:50:36 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40503) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTCXJ-0001aW-S0 for qemu-devel@nongnu.org; Thu, 27 Mar 2014 11:48:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WTCXD-0001Ud-Oy for qemu-devel@nongnu.org; Thu, 27 Mar 2014 11:48:09 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:46949) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTCXD-0001UB-HR; Thu, 27 Mar 2014 11:48:03 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 4E4214372B; Thu, 27 Mar 2014 19:48:02 +0400 (MSK) Received: from tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.corpit.ru (Postfix) with SMTP id A393A67D; Thu, 27 Mar 2014 19:28:34 +0400 (MSK) Received: (nullmailer pid 1817 invoked by uid 1000); Thu, 27 Mar 2014 15:28:30 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Thu, 27 Mar 2014 19:28:26 +0400 Message-Id: <1395934108-1694-22-git-send-email-mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1395934108-1694-1-git-send-email-mjt@msgid.tls.msk.ru> References: <1395934108-1694-1-git-send-email-mjt@msgid.tls.msk.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 86.62.121.231 Cc: qemu-trivial@nongnu.org, Peter Maydell , Michael Tokarev Subject: [Qemu-devel] [PULL 21/23] 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: mjt@tls.msk.ru X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.170 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 From: Peter Maydell Add U suffix to avoid undefined behaviour. Signed-off-by: Peter Maydell Signed-off-by: Michael Tokarev --- 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