From b85d45947951d23cb22d90caecf4c1eb81342c96 Mon Sep 17 00:00:00 2001 From: Max Filippov Date: Thu, 24 Sep 2015 23:34:02 +0300 Subject: [PATCH] xtensa: xtfpga: fix integer overflow in TASK_SIZE This fixes the following warning when default memory region crosses 0x80000000: arch/xtensa/include/asm/processor.h:40:47: warning: integer overflow in expression [-Woverflow] #define TASK_SIZE (PLATFORM_DEFAULT_MEM_START + PLATFORM_DEFAULT_MEM_SIZE) ^ Signed-off-by: Max Filippov --- arch/xtensa/platforms/xtfpga/include/platform/hardware.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/xtensa/platforms/xtfpga/include/platform/hardware.h b/arch/xtensa/platforms/xtfpga/include/platform/hardware.h index 0a55bb9c5420..dbeea2b440a1 100644 --- a/arch/xtensa/platforms/xtfpga/include/platform/hardware.h +++ b/arch/xtensa/platforms/xtfpga/include/platform/hardware.h @@ -12,13 +12,15 @@ * This file contains the hardware configuration of the XTAVNET boards. */ +#include + #ifndef __XTENSA_XTAVNET_HARDWARE_H #define __XTENSA_XTAVNET_HARDWARE_H /* Memory configuration. */ -#define PLATFORM_DEFAULT_MEM_START CONFIG_DEFAULT_MEM_START -#define PLATFORM_DEFAULT_MEM_SIZE CONFIG_DEFAULT_MEM_SIZE +#define PLATFORM_DEFAULT_MEM_START __XTENSA_UL(CONFIG_DEFAULT_MEM_START) +#define PLATFORM_DEFAULT_MEM_SIZE __XTENSA_UL(CONFIG_DEFAULT_MEM_SIZE) /* Interrupt configuration. */ -- 2.20.1