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: Yann Gautier <yann.gautier@st.com>
This commit is contained in:
Yann Gautier 2018-12-03 13:38:06 +01:00
parent e7c645b520
commit b7c6529c41
6 changed files with 8 additions and 6 deletions

View File

@ -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;

View File

@ -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

View File

@ -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)
/*

View File

@ -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

View File

@ -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

View File

@ -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))