From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3zmHrc2zZnzF1D5 for ; Wed, 21 Feb 2018 11:08:32 +1100 (AEDT) From: =?UTF-8?q?Jonathan=20Neusch=C3=A4fer?= To: linuxppc-dev@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org, Michael Ellerman , linux-mm@kvack.org, Joel Stanley , =?UTF-8?q?Jonathan=20Neusch=C3=A4fer?= , Benjamin Herrenschmidt , Paul Mackerras , Nathan Fontenot , Michael Bringmann , Thomas Gleixner , Thiago Jung Bauermann , Anshuman Khandual Subject: [PATCH 2/6] powerpc: numa: Fix overshift on PPC32 Date: Tue, 20 Feb 2018 17:14:20 +0100 Message-Id: <20180220161424.5421-3-j.neuschaefer@gmx.net> In-Reply-To: <20180220161424.5421-1-j.neuschaefer@gmx.net> References: <20180220161424.5421-1-j.neuschaefer@gmx.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , When read_n_cells is compiled for PPC32, "result << 32" causes an overshift, which GCC doesn't like. Fix this by using u64 instead of unsigned long. Signed-off-by: Jonathan Neuschäfer --- arch/powerpc/mm/numa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index edd8d0bc9364..0570bc2a0b13 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c @@ -357,9 +357,9 @@ static void __init get_n_mem_cells(int *n_addr_cells, int *n_size_cells) of_node_put(memory); } -static unsigned long read_n_cells(int n, const __be32 **buf) +static u64 read_n_cells(int n, const __be32 **buf) { - unsigned long result = 0; + u64 result = 0; while (n--) { result = (result << 32) | of_read_number(*buf, 1); -- 2.16.1