]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
xtensa: xtfpga: fix integer overflow in TASK_SIZE
authorMax Filippov <jcmvbkbc@gmail.com>
Thu, 24 Sep 2015 20:34:02 +0000 (23:34 +0300)
committerMax Filippov <jcmvbkbc@gmail.com>
Mon, 2 Nov 2015 15:02:55 +0000 (18:02 +0300)
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 <jcmvbkbc@gmail.com>
arch/xtensa/platforms/xtfpga/include/platform/hardware.h

index 0a55bb9c5420f40d8afd68563427870b483cf8b9..dbeea2b440a1b50bd3e6a1eea85dcb7626244a91 100644 (file)
  * This file contains the hardware configuration of the XTAVNET boards.
  */
 
+#include <asm/types.h>
+
 #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. */