From patchwork Fri Sep 4 13:29:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Fedin X-Patchwork-Id: 7122851 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D2B4C9F32B for ; Fri, 4 Sep 2015 13:32:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1824420896 for ; Fri, 4 Sep 2015 13:32:49 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 340E2204F6 for ; Fri, 4 Sep 2015 13:32:46 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZXr4Y-00059x-1G; Fri, 04 Sep 2015 13:30:30 +0000 Received: from mailout1.w1.samsung.com ([210.118.77.11]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZXr4P-00045A-MA for linux-arm-kernel@lists.infradead.org; Fri, 04 Sep 2015 13:30:22 +0000 MIME-version: 1.0 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NU500IL0MTXSWB0@mailout1.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Fri, 04 Sep 2015 14:29:57 +0100 (BST) X-AuditID: cbfec7f5-f794b6d000001495-ef-55e99cd56f79 Received: from eusync3.samsung.com ( [203.254.199.213]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id BD.F5.05269.5DC99E55; Fri, 4 Sep 2015 14:29:57 +0100 (BST) Received: from fedinw7x64.rnd.samsung.ru ([106.109.131.169]) by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NU5001RJMTSWT00@eusync3.samsung.com>; Fri, 04 Sep 2015 14:29:57 +0100 (BST) From: Pavel Fedin To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v4 TRIVIAL 2/2] ARM: Fix GICv2m build warning on 32 bits Date: Fri, 04 Sep 2015 16:29:52 +0300 Message-id: <1935621cb5eb23d740e8e49c1ab15dddcc14511c.1441373056.git.p.fedin@samsung.com> X-Mailer: git-send-email 2.4.4 In-reply-to: References: In-reply-to: References: X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrMLMWRmVeSWpSXmKPExsVy+t/xq7pX57wMNfh0UMpi0+NrrBa3L/Na /L3zj83i/f7LTBYvP55gcWD1WDNvDaNHS3MPm8emVZ1sHpuX1AewRHHZpKTmZJalFunbJXBl rFl0jKXgOUfFqjdHGRsYN7N3MXJySAiYSNxc8ooVwhaTuHBvPVsXIxeHkMBSRokpn96xgSR4 BQQlfky+x9LFyMHBLCAvceRSNkiYWUBdYtK8RcwQ9W1MEi1Pu8Hq2YASp79+YAGxRQQ0JKZ0 PWYHKWIWaGeUuDJ9DdhmYQEPia9HNjGC2CwCqhIztrxnhFgWLbFr7Q82iIvkJK5cnw5mcwqY S8zZsQbMFhIwk9iydycrLvEJjEKzkNw9C+HuWUjuXsDIvIpRNLU0uaA4KT3XSK84Mbe4NC9d Lzk/dxMjJOi/7mBceszqEKMAB6MSD+/JHy9ChVgTy4orcw8xSnAwK4nwTg18GSrEm5JYWZVa lB9fVJqTWnyIUZqDRUmcd+au9yFCAumJJanZqakFqUUwWSYOTqkGxh2pwc95jBuvL5hntezv 4Sk9S/dznnwqFeVT+XmWwYbqZPGOJdMP77DIuTZRKPyI8uF70ZMfJN+wv/vni2BkUXzKmS03 LE5K+K2JOL3mbvZV04AFy28LsJ6V4GLJitMWtddc3X3k6CsGZR63J5NsnvbqeqrsuGd/VbMz 58c7E5clikJCU1m1LyuxFGckGmoxFxUnAgCgV8OrdgIAAA== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150904_063021_877611_D8307F4C X-CRM114-Status: GOOD ( 13.87 ) X-Spam-Score: -6.9 (------) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marc Zyngier , Russell King , trivial@kernel.org, Will Deacon Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP After GICv2m was enabled for 32-bit ARM kernel, a warning popped up: drivers/irqchip/irq-gic-v2m.c: In function ?gicv2m_compose_msi_msg?: drivers/irqchip/irq-gic-v2m.c:100:2: warning: right shift count >= width of type [enabled by default] msg->address_hi = (u32) (addr >> 32); ^ This patch fixes it by using proper macros for splitting up the value. Signed-off-by: Pavel Fedin Reviewed-by: Marc Zyngier --- drivers/irqchip/irq-gic-v2m.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-gic-v2m.c b/drivers/irqchip/irq-gic-v2m.c index fdf7065..9055b02 100644 --- a/drivers/irqchip/irq-gic-v2m.c +++ b/drivers/irqchip/irq-gic-v2m.c @@ -97,8 +97,8 @@ static void gicv2m_compose_msi_msg(struct irq_data *data, struct msi_msg *msg) struct v2m_data *v2m = irq_data_get_irq_chip_data(data); phys_addr_t addr = v2m->res.start + V2M_MSI_SETSPI_NS; - msg->address_hi = (u32) (addr >> 32); - msg->address_lo = (u32) (addr); + msg->address_hi = upper_32_bits(addr); + msg->address_lo = lower_32_bits(addr); msg->data = data->hwirq; }