Commit b7c6529c authored by Yann Gautier's avatar Yann Gautier
Browse files

io_block: define MAX_IO_BLOCK_DEVICES as unsigned



This is used as a table index, and already compared with an unsigned int:
block_dev_count.
Signed-off-by: default avatarYann Gautier <yann.gautier@st.com>
parent e7c645b5
......@@ -67,8 +67,10 @@ io_type_t device_type_block(void)
static int find_first_block_state(const io_block_dev_spec_t *dev_spec,
unsigned int *index_out)
{
unsigned int index;
int result = -ENOENT;
for (int index = 0; index < MAX_IO_BLOCK_DEVICES; ++index) {
for (index = 0U; index < MAX_IO_BLOCK_DEVICES; ++index) {
/* dev_spec is used as identifier since it's unique */
if (state_pool[index].dev_spec == dev_spec) {
result = 0;
......
......@@ -41,7 +41,7 @@
#define MAX_IO_DEVICES 3
#define MAX_IO_HANDLES 4
/* eMMC RPMB and eMMC User Data */
#define MAX_IO_BLOCK_DEVICES 2
#define MAX_IO_BLOCK_DEVICES U(2)
/* GIC related constants (no GICR in GIC-400) */
#define PLAT_ARM_GICD_BASE 0xF6801000
......
......@@ -38,7 +38,7 @@
#define MAX_IO_DEVICES 3
#define MAX_IO_HANDLES 4
/* UFS RPMB and UFS User Data */
#define MAX_IO_BLOCK_DEVICES 2
#define MAX_IO_BLOCK_DEVICES U(2)
/*
......
......@@ -40,7 +40,7 @@
/* IO framework user */
#define MAX_IO_DEVICES (4)
#define MAX_IO_HANDLES (4)
#define MAX_IO_BLOCK_DEVICES (2)
#define MAX_IO_BLOCK_DEVICES U(2)
/* Memory size options */
#define POPLAR_DRAM_SIZE_1G 0
......
......@@ -169,7 +169,7 @@
#define MAX_XLAT_TABLES 6
#define MAX_IO_DEVICES 2
#define MAX_IO_HANDLES 3
#define MAX_IO_BLOCK_DEVICES 1
#define MAX_IO_BLOCK_DEVICES 1U
/* UART defines */
#if PLAT_WARP7_UART == 1
......
......@@ -53,7 +53,7 @@
#define MAX_IO_HANDLES 2
#define MAX_IO_DEVICES 2
#define MAX_IO_BLOCK_DEVICES 1
#define MAX_IO_BLOCK_DEVICES U(1)
#define TSP_SEC_MEM_BASE (BL32_BASE)
#define TSP_SEC_MEM_SIZE ((BL32_LIMIT) - (BL32_BASE))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment