Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3191288ybd; Mon, 24 Jun 2019 21:22:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqzyUlqM1Z2Y7iseY//UMR86Ru2/sKpi9OQe0b144m8zG75qHDlhHHJgdfY0sWeKU3lM9Fix X-Received: by 2002:a17:90a:21cc:: with SMTP id q70mr30120307pjc.56.1561436557209; Mon, 24 Jun 2019 21:22:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561436557; cv=none; d=google.com; s=arc-20160816; b=vTM0qFvb2YaGkvmtKYKYQ3oYhDFg807x9I266tZ85bo/dKqllZN5kbWCShoX74K8V9 yZqTDIgyI7yvf0fYKqvuipn0/Vm92l7Z8SI2R5EFD1D9Zl4YDkIah5FVLN0bWI/Hwpwq k1IkD9vRQZ77bmnLVgh9NcUPpLUZ9c5Fkj7Ef4f1l1lmuL2MgmG8dZLngXdSfYPpBC/t Wujq+ByiyEy1n2TOOp5oD67qQmQ7Vn7Ubi8bpkpniDzptNhKP6Z97xuJ5gD3KN27M+vl dSaYRDz5gY93M5eEbZNvw4nAtD112OvmkyuYElIAl9aTgPxqJJMZBwP1yJOFlVS7QFMP xZIg== 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=7+uT5l4SI9KUGhnGj8pF0zC23hQ8u8aSZYqwmnqFj+w=; b=zJtkeFdzyB2xh6SzZwnlAQdgahm0qu9xyRk3dk7jeBxFg1LT8HA/FzBQEnUlkCM7iI iHpxtD9uQjqDOxVGLD+yblYHxStgVef8iuOsQqlVGfP/WZBbNB+pr9eJWB209iPSgw8p CUluI0qu2egz3Z4Y2CvJRjNvGN3Y3eBPQuDfLJ9FUzeEI/0EhE9yaszoC4msHnyuGQFK ajUSsXw/81N1AxuV2qUtr3IJQd02+OJbP1HbU1ATVaeenoXb9MkhivDGNbeLET1URd/K xu2gm/NPPzlFyliZB7EJyRNJP6vdqe3snSQXAPd0y7BigLHE2jXBmtblZt7leo4S9HXJ lwkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PNlyZWSo; 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 z23si12137723plo.160.2019.06.24.21.22.21; Mon, 24 Jun 2019 21:22:37 -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=PNlyZWSo; 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 S1728366AbfFYEGG (ORCPT + 99 others); Tue, 25 Jun 2019 00:06:06 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:38005 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726631AbfFYEGF (ORCPT ); Tue, 25 Jun 2019 00:06:05 -0400 Received: by mail-pf1-f194.google.com with SMTP id y15so4086204pfn.5; Mon, 24 Jun 2019 21:06:05 -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=7+uT5l4SI9KUGhnGj8pF0zC23hQ8u8aSZYqwmnqFj+w=; b=PNlyZWSoCU7l5uDic3Knn28MqbfxUiHK4vRg2k9s5new2imIWuYxxYzc2KUG6h7bZJ xtg9GiD/Z99BkkXe1vbzqVGUb/2+5MzOCOLTIh6qi3GEEQ3TTvocnZj2q/HRnX8f/5Vj NeaHoK4yjxNkTgrxzKDQuJh1/+ayo9px3D+LfTdJN+8G4Xbn8/C8F47PJqXJtzrmFy3e gP1dJ932jvHmv8FTIOsy/5bLVHZH40zATj+mDJZzVreCUKvyRY2QjYBqVatOC3pk6Nod G37fTmWNrl8RY4Flcqld8MovGl8uJcj2Ak/vw+ythRSAHILLkYSTRRxT5CO+scg5JGRt rfKg== 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=7+uT5l4SI9KUGhnGj8pF0zC23hQ8u8aSZYqwmnqFj+w=; b=jL8TN4B69XGHyHUaHHwbhtnhbzB/Qp36MzI4tM/0CEInTknHtGpgQX3+v2G8tvu9HR WbJA5wwHuKLeb/y1SNYm8y/7qfAyofq9FLulr5xyfHqMQYOPDaG1Cq/1EJbX9wcQt801 Q4WyS7xu047j8johMDv2Nf6IqCVFjm7DTFDKIGjja0hRu3NlLT6F9jYQD8jgYmVK4A2q DAnlUAM71LT7xQo86Bu2XFK6F/5D2BcoJhj+kFFhzsSWp3HEDrY0Yf8h7N6ueK0JAH0Y MTAY7TAOahsZrNDFbW53VHLvQrJWFyxpxXNSxhx5mW2NWEly2lmqbpiaZb0xHO5/UrUi x9/g== X-Gm-Message-State: APjAAAXjAP3bJzDwzDy0MBIE1ncgTaeDaLh++jxJyKYGh5L7for0jV9P um4rbZPleFOW1wnoU7zvnHY= X-Received: by 2002:a63:130c:: with SMTP id i12mr1386060pgl.316.1561435564661; Mon, 24 Jun 2019 21:06:04 -0700 (PDT) Received: from debian.net.fpt ([58.187.168.105]) by smtp.gmail.com with ESMTPSA id b24sm12408944pfd.98.2019.06.24.21.05.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Jun 2019 21:06:03 -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 V3 10/15] ARM: orion5x: cleanup cppcheck shifting errors Date: Tue, 25 Jun 2019 11:03:51 +0700 Message-Id: <20190625040356.27473-11-tranmanphong@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190625040356.27473-1-tranmanphong@gmail.com> References: <20190624135105.15579-1-tranmanphong@gmail.com> <20190625040356.27473-1-tranmanphong@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is error from cppcheck tool "Shifting signed 32-bit value by 31 bits is undefined behaviour errors" change to use BIT() marco for improvement. 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