Skip to content

Commit

Permalink
xtensa: xtfpga: fix integer overflow in TASK_SIZE
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Max Filippov committed Nov 2, 2015
1 parent 01618bd commit b85d459
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions arch/xtensa/platforms/xtfpga/include/platform/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@
* 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. */

Expand Down

0 comments on commit b85d459

Please sign in to comment.