fix(mmc): align part config type
This corrects MISRA C2012 10.3: The value of an expression shall not be
assigned to an object with a narrower essential type or of a different
essential type category.
Set part_config to be an unsigned char everywhere it is used.
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I9cf87848fb016a5630b3c8091290419e3bc62b91
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index d6f4421..2b727d4 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -111,7 +111,7 @@
return MMC_GET_STATE(resp_data[0]);
}
-static int mmc_send_part_switch_cmd(unsigned int part_config)
+static int mmc_send_part_switch_cmd(unsigned char part_config)
{
int ret;
unsigned int part_time = 0;
@@ -759,9 +759,9 @@
return size;
}
-static int mmc_part_switch(unsigned int part_type)
+static int mmc_part_switch(unsigned char part_type)
{
- uint8_t part_config = mmc_ext_csd[CMD_EXTCSD_PARTITION_CONFIG];
+ unsigned char part_config = mmc_ext_csd[CMD_EXTCSD_PARTITION_CONFIG];
part_config &= ~EXT_CSD_PART_CONFIG_ACC_MASK;
part_config |= part_type;