Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752066AbcDRIgZ (ORCPT ); Mon, 18 Apr 2016 04:36:25 -0400 Received: from mail-io0-f175.google.com ([209.85.223.175]:36397 "EHLO mail-io0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751863AbcDRIgW (ORCPT ); Mon, 18 Apr 2016 04:36:22 -0400 MIME-Version: 1.0 In-Reply-To: <1460968481-169298-1-git-send-email-arnd@arndb.de> References: <1460968481-169298-1-git-send-email-arnd@arndb.de> Date: Mon, 18 Apr 2016 10:36:21 +0200 Message-ID: Subject: Re: [PATCH] efi: ARM: avoid warning about phys_addr_t cast From: Ard Biesheuvel To: Arnd Bergmann Cc: Will Deacon , Matt Fleming , Steve Capper , David Daney , Catalin Marinas , Mark Rutland , Leif Lindholm , Dan Williams , "linux-efi@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1433 Lines: 38 On 18 April 2016 at 10:34, Arnd Bergmann wrote: > memblock_remove() takes a phys_addr_t, which may be narrower than 64 bits, > causing a harmless warning: > > drivers/firmware/efi/arm-init.c: In function 'reserve_regions': > include/linux/kernel.h:29:20: error: large integer implicitly truncated to unsigned type [-Werror=overflow] > #define ULLONG_MAX (~0ULL) > ^ > drivers/firmware/efi/arm-init.c:152:21: note: in expansion of macro 'ULLONG_MAX' > memblock_remove(0, ULLONG_MAX); > > This adds an explicit typecast to avoid the warning > > Signed-off-by: Arnd Bergmann > Fixes: 500899c2cc3e ("efi: ARM/arm64: ignore DT memory nodes instead of removing them") Acked-by: Ard Biesheuvel > --- > drivers/firmware/efi/arm-init.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/firmware/efi/arm-init.c b/drivers/firmware/efi/arm-init.c > index 434dd6065935..fac567c3b66a 100644 > --- a/drivers/firmware/efi/arm-init.c > +++ b/drivers/firmware/efi/arm-init.c > @@ -149,7 +149,7 @@ static __init void reserve_regions(void) > * uses its own memory map instead. > */ > memblock_dump_all(); > - memblock_remove(0, ULLONG_MAX); > + memblock_remove(0, (phys_addr_t)ULLONG_MAX); > > for_each_efi_memory_desc(&memmap, md) { > paddr = md->phys_addr; > -- > 2.7.0 >