summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay@st.com>2019-06-21 15:26:39 +0200
committerPatrick Delaunay <patrick.delaunay@st.com>2019-07-12 11:50:54 +0200
commite609e131c1e06bc3ed2da01709c889934433d76c (patch)
treedd29b36cfb15a6d7e5c1d2ab83889c37a318f53a /arch
parent9421781466f0c1490a4397f53b9955f63effd78f (diff)
downloadu-boot-e609e131c1e06bc3ed2da01709c889934433d76c.tar.gz
u-boot-e609e131c1e06bc3ed2da01709c889934433d76c.tar.bz2
u-boot-e609e131c1e06bc3ed2da01709c889934433d76c.zip
stm32mp1: Fix warnings when compiling with W=1
This patch solves the following warnings: arch/arm/mach-stm32mp/cpu.c:378:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (instance > ARRAY_SIZE(serial_addr)) ^ Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-stm32mp/cpu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-stm32mp/cpu.c b/arch/arm/mach-stm32mp/cpu.c
index d4f2ea821a..10190f40d4 100644
--- a/arch/arm/mach-stm32mp/cpu.c
+++ b/arch/arm/mach-stm32mp/cpu.c
@@ -361,7 +361,7 @@ static void setup_boot_mode(void)
u32 boot_ctx = readl(TAMP_BOOT_CONTEXT);
u32 boot_mode =
(boot_ctx & TAMP_BOOT_MODE_MASK) >> TAMP_BOOT_MODE_SHIFT;
- int instance = (boot_mode & TAMP_BOOT_INSTANCE_MASK) - 1;
+ unsigned int instance = (boot_mode & TAMP_BOOT_INSTANCE_MASK) - 1;
u32 forced_mode = (boot_ctx & TAMP_BOOT_FORCED_MASK);
struct udevice *dev;
int alias;