* [PATCH] efi: ARM: avoid warning about phys_addr_t cast
@ 2016-04-18 8:34 Arnd Bergmann
2016-04-18 8:36 ` Ard Biesheuvel
[not found] ` <1460968481-169298-1-git-send-email-arnd-r2nGTMty4D4@public.gmane.org>
0 siblings, 2 replies; 4+ messages in thread
From: Arnd Bergmann @ 2016-04-18 8:34 UTC (permalink / raw)
To: Will Deacon, Matt Fleming
Cc: Steve Capper, Ard Biesheuvel, David Daney, Arnd Bergmann,
Catalin Marinas, Mark Rutland, Leif Lindholm, Dan Williams,
linux-efi-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
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 <arnd-r2nGTMty4D4@public.gmane.org>
Fixes: 500899c2cc3e ("efi: ARM/arm64: ignore DT memory nodes instead of removing them")
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] efi: ARM: avoid warning about phys_addr_t cast
2016-04-18 8:34 [PATCH] efi: ARM: avoid warning about phys_addr_t cast Arnd Bergmann
@ 2016-04-18 8:36 ` Ard Biesheuvel
[not found] ` <1460968481-169298-1-git-send-email-arnd-r2nGTMty4D4@public.gmane.org>
1 sibling, 0 replies; 4+ messages in thread
From: Ard Biesheuvel @ 2016-04-18 8:36 UTC (permalink / raw)
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
On 18 April 2016 at 10:34, Arnd Bergmann <arnd@arndb.de> 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 <arnd@arndb.de>
> Fixes: 500899c2cc3e ("efi: ARM/arm64: ignore DT memory nodes instead of removing them")
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
> 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
>
^ permalink raw reply [flat|nested] 4+ messages in thread[parent not found: <1460968481-169298-1-git-send-email-arnd-r2nGTMty4D4@public.gmane.org>]
* Re: [PATCH] efi: ARM: avoid warning about phys_addr_t cast
[not found] ` <1460968481-169298-1-git-send-email-arnd-r2nGTMty4D4@public.gmane.org>
@ 2016-04-18 21:12 ` Matt Fleming
[not found] ` <20160418211233.GZ2829-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Matt Fleming @ 2016-04-18 21:12 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Will Deacon, Steve Capper, Ard Biesheuvel, David Daney,
Catalin Marinas, Mark Rutland, Leif Lindholm, Dan Williams,
linux-efi-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
On Mon, 18 Apr, at 10:34:19AM, 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 <arnd-r2nGTMty4D4@public.gmane.org>
> Fixes: 500899c2cc3e ("efi: ARM/arm64: ignore DT memory nodes instead of removing them")
> ---
> drivers/firmware/efi/arm-init.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Will, this one is for you.
Reviewed-by: Matt Fleming <matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-04-19 13:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-18 8:34 [PATCH] efi: ARM: avoid warning about phys_addr_t cast Arnd Bergmann
2016-04-18 8:36 ` Ard Biesheuvel
[not found] ` <1460968481-169298-1-git-send-email-arnd-r2nGTMty4D4@public.gmane.org>
2016-04-18 21:12 ` Matt Fleming
[not found] ` <20160418211233.GZ2829-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2016-04-19 13:46 ` Will Deacon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox