Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2489863ybd; Mon, 24 Jun 2019 07:19:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqyYfvxem+NrPTr3y93zoByji/wXaNHYF53vzGqDYfgbAVKbYVnQ5WWJWmgqpgf5aMzrqQfI X-Received: by 2002:a17:902:b688:: with SMTP id c8mr3776604pls.243.1561385969978; Mon, 24 Jun 2019 07:19:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561385969; cv=none; d=google.com; s=arc-20160816; b=H1lY6IAtP6z9qQsgCX8s7IGYConGH1YSY0AA1rdjJ1mkKrl+ZJaV/jjDKsIZ0xBEEj PkHJZtezIOH0PlWtz7a6Bn1jLrF2pmGDI0kV3eS5xkci8SbUVcD/UJZnNpMjAIP2bq5A BjrBWN5H7ouOBTJF51fj1BFR5VJWSQzwcHZ17sjJC0UrH402ovTk52PiMoRgJROC9Pwa LKDhvP0mLYaHWHimK6TCCdpN8jyGIYmuZ4xzZw0MSSKI8N+NwlZv6xvRefUixTwg/CtQ NdvApynLl+BwkhobPtrCkfRNcN4PfSbuyQyAFfsgJfBkXK5rc1hr8XV4qLP5jtofvTOt MlxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=mlREJgkyzOGgqa6hvXlcb+zdPjqgmfDST6qRrYmoOVw=; b=heXqakT72Vmm9e/TcjDMGR00I9NoVxivBb88H29RtgSympThoWQ57EwXbdixy5t/z2 HgeZjBW5GtwUzjlrFgg/PmEuOE2mGXeLPrg7+ZPVcpRt92dJO/Qcqjch2dxHOxxYu6vO VPBcvlNUAs/7Z3qErCJC0a7IOH7e2SjvZyvcDdIB07L/ZgzIeMxuDYTCF5zUN0YHs50B nImJaV09tZjw5qXMpmVBCn+n7pa2jwzjSrNpUZnY1LyVSh1z1dHkv6VKpE6eLJzzysiH hRcfUm2SfOhYqH/+k3wpYSmmYXB9qSBX40CSCgzQbxsdJJ0ujriNQY54WmWOBOTLQz89 6cPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pnutwrSC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a17si10543663pjq.31.2019.06.24.07.19.13; Mon, 24 Jun 2019 07:19:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pnutwrSC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731607AbfFXNxM (ORCPT + 99 others); Mon, 24 Jun 2019 09:53:12 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:44560 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725562AbfFXNxL (ORCPT ); Mon, 24 Jun 2019 09:53:11 -0400 Received: by mail-pg1-f194.google.com with SMTP id n2so7149080pgp.11; Mon, 24 Jun 2019 06:53:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=mlREJgkyzOGgqa6hvXlcb+zdPjqgmfDST6qRrYmoOVw=; b=pnutwrSCoeiVbQcU9DkZgxhdQoYC5u3JvE+2/kRDTf4CcjA+odO39HCpoT8nNdUoyx 72AKfdG/8Ly1X37qsowfkEO7Yf+lURhuSCuX/iC28dooZGA5EZ3bHHsKho6TlAQTa6/v ujo8thuH53L0+e4Hu6gHI95j+DvGQleG8rpS5/1BxhB/mkOOZjNdKaWK0J1RC116NEny lXj+/7W0Hq7s8wQirE82ewxN0xSy/XHbbLhCNrOxBn1xRnirlQYKobWSJr4axbwbX86t nhcrXkVbrTrLBCOamZgakH4jaKbwnuTyRMY+YI5itoZBaGq+I0wOz5265IlnTGblOeza w5Uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=mlREJgkyzOGgqa6hvXlcb+zdPjqgmfDST6qRrYmoOVw=; b=mZ5n46OcDgRpI1QEWpafw6Q8EWl41l6W9aaDZ5HWcXKgnoiW4HwfJkkm1c4EdYJK+B TFO2qAVuUP8u19TdnePo9RCtUUUS5SJyXUheGgOZx+lLlEst6cVvZqEAVIglFIxSZIm0 S6z66R6i87/jm+Dt2cUhwfafZPpwfvQU1NwG8ixRy8PK0LeD2WaGCqQs97c9JCGfFDwA z7EYqDdtHBgIc40/e0jrYM1fiSZlDp2W+3aEOlNNjAdiBMrdhYYySPniAFqC5i/li9bw JsZ50r/ZDClTI1x2idcWSEQFrbuMSyXHGo8K2x1ikX99hq6uwhndO4AAI/VbGqvw9UPd +eVw== X-Gm-Message-State: APjAAAW8RxXKReXCaFF3mb2dKfHflhlHn2sv7iQIs36u1fEjN4vGhFoI W/67Uw4qNVGWJSFgaU7zQrk= X-Received: by 2002:a17:90a:2ec1:: with SMTP id h1mr25021009pjs.101.1561384390859; Mon, 24 Jun 2019 06:53:10 -0700 (PDT) Received: from debian.net.fpt ([58.187.168.105]) by smtp.gmail.com with ESMTPSA id 85sm11187901pgb.52.2019.06.24.06.53.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Jun 2019 06:53:10 -0700 (PDT) From: Phong Tran To: tranmanphong@gmail.com Cc: acme@kernel.org, alexander.shishkin@linux.intel.com, alexander.sverdlin@gmail.com, allison@lohutok.net, andrew@lunn.ch, ast@kernel.org, bgolaszewski@baylibre.com, bpf@vger.kernel.org, daniel@iogearbox.net, daniel@zonque.org, dmg@turingmachine.org, festevam@gmail.com, gerg@uclinux.org, gregkh@linuxfoundation.org, gregory.clement@bootlin.com, haojian.zhuang@gmail.com, hsweeten@visionengravers.com, illusionist.neo@gmail.com, info@metux.net, jason@lakedaemon.net, jolsa@redhat.com, kafai@fb.com, kernel@pengutronix.de, kgene@kernel.org, krzk@kernel.org, kstewart@linuxfoundation.org, linux-arm-kernel@lists.infradead.org, linux-imx@nxp.com, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux@armlinux.org.uk, liviu.dudau@arm.com, lkundrak@v3.sk, lorenzo.pieralisi@arm.com, mark.rutland@arm.com, mingo@redhat.com, namhyung@kernel.org, netdev@vger.kernel.org, nsekhar@ti.com, peterz@infradead.org, robert.jarzmik@free.fr, s.hauer@pengutronix.de, sebastian.hesselbarth@gmail.com, shawnguo@kernel.org, songliubraving@fb.com, sudeep.holla@arm.com, swinslow@gmail.com, tglx@linutronix.de, tony@atomide.com, will@kernel.org, yhs@fb.com Subject: [PATCH V2 10/15] ARM: orion5x: cleanup cppcheck shifting errors Date: Mon, 24 Jun 2019 20:51:00 +0700 Message-Id: <20190624135105.15579-11-tranmanphong@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190624135105.15579-1-tranmanphong@gmail.com> References: <20190623151313.970-1-tranmanphong@gmail.com> <20190624135105.15579-1-tranmanphong@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [arch/arm/mach-orion5x/pci.c:281]: (error) Shifting signed 32-bit value by 31 bits is undefined behaviour [arch/arm/mach-orion5x/pci.c:305]: (error) Shifting signed 32-bit value by 31 bits is undefined behaviour Signed-off-by: Phong Tran Reviewed-by: Andrew Lunn --- arch/arm/mach-orion5x/pci.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-orion5x/pci.c b/arch/arm/mach-orion5x/pci.c index 76951bfbacf5..f47668530d5e 100644 --- a/arch/arm/mach-orion5x/pci.c +++ b/arch/arm/mach-orion5x/pci.c @@ -200,13 +200,13 @@ static int __init pcie_setup(struct pci_sys_data *sys) /* * PCI_MODE bits */ -#define PCI_MODE_64BIT (1 << 2) -#define PCI_MODE_PCIX ((1 << 4) | (1 << 5)) +#define PCI_MODE_64BIT BIT(2) +#define PCI_MODE_PCIX (BIT(4) | BIT(5)) /* * PCI_CMD bits */ -#define PCI_CMD_HOST_REORDER (1 << 29) +#define PCI_CMD_HOST_REORDER BIT(29) /* * PCI_P2P_CONF bits @@ -223,7 +223,7 @@ static int __init pcie_setup(struct pci_sys_data *sys) #define PCI_CONF_FUNC(func) (((func) & 0x3) << 8) #define PCI_CONF_DEV(dev) (((dev) & 0x1f) << 11) #define PCI_CONF_BUS(bus) (((bus) & 0xff) << 16) -#define PCI_CONF_ADDR_EN (1 << 31) +#define PCI_CONF_ADDR_EN BIT(31) /* * Internal configuration space -- 2.11.0