bl: security_state should be of type unsigned int
security_state is either 0 or 1. Prevent sign conversion potential error (setting -Werror=sign-conversion results in a build error). Signed-off-by: Yann Gautier <yann.gautier@st.com> Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
This commit is contained in:
parent
b1187232fd
commit
550740833d
|
@ -26,13 +26,13 @@ static void *bl1_next_cpu_context_ptr;
|
||||||
static void *bl1_next_smc_context_ptr;
|
static void *bl1_next_smc_context_ptr;
|
||||||
|
|
||||||
/* Following functions are used for SMC context handling */
|
/* Following functions are used for SMC context handling */
|
||||||
void *smc_get_ctx(int security_state)
|
void *smc_get_ctx(unsigned int security_state)
|
||||||
{
|
{
|
||||||
assert(sec_state_is_valid(security_state));
|
assert(sec_state_is_valid(security_state));
|
||||||
return &bl1_smc_context[security_state];
|
return &bl1_smc_context[security_state];
|
||||||
}
|
}
|
||||||
|
|
||||||
void smc_set_next_ctx(int security_state)
|
void smc_set_next_ctx(unsigned int security_state)
|
||||||
{
|
{
|
||||||
assert(sec_state_is_valid(security_state));
|
assert(sec_state_is_valid(security_state));
|
||||||
bl1_next_smc_context_ptr = &bl1_smc_context[security_state];
|
bl1_next_smc_context_ptr = &bl1_smc_context[security_state];
|
||||||
|
|
|
@ -33,13 +33,13 @@ static smc_ctx_t sp_min_smc_context[PLATFORM_CORE_COUNT];
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* Define the smcc helper library API's
|
* Define the smcc helper library API's
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
void *smc_get_ctx(int security_state)
|
void *smc_get_ctx(unsigned int security_state)
|
||||||
{
|
{
|
||||||
assert(security_state == NON_SECURE);
|
assert(security_state == NON_SECURE);
|
||||||
return &sp_min_smc_context[plat_my_core_pos()];
|
return &sp_min_smc_context[plat_my_core_pos()];
|
||||||
}
|
}
|
||||||
|
|
||||||
void smc_set_next_ctx(int security_state)
|
void smc_set_next_ctx(unsigned int security_state)
|
||||||
{
|
{
|
||||||
assert(security_state == NON_SECURE);
|
assert(security_state == NON_SECURE);
|
||||||
/* SP_MIN stores only non secure smc context. Nothing to do here */
|
/* SP_MIN stores only non secure smc context. Nothing to do here */
|
||||||
|
|
|
@ -144,10 +144,10 @@ CASSERT(SMC_CTX_SIZE == sizeof(smc_ctx_t), assert_smc_ctx_size_mismatch);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Get the pointer to `smc_ctx_t` corresponding to the security state. */
|
/* Get the pointer to `smc_ctx_t` corresponding to the security state. */
|
||||||
void *smc_get_ctx(int security_state);
|
void *smc_get_ctx(unsigned int security_state);
|
||||||
|
|
||||||
/* Set the next `smc_ctx_t` corresponding to the security state. */
|
/* Set the next `smc_ctx_t` corresponding to the security state. */
|
||||||
void smc_set_next_ctx(int security_state);
|
void smc_set_next_ctx(unsigned int security_state);
|
||||||
|
|
||||||
/* Get the pointer to next `smc_ctx_t` already set by `smc_set_next_ctx()`. */
|
/* Get the pointer to next `smc_ctx_t` already set by `smc_set_next_ctx()`. */
|
||||||
void *smc_get_next_ctx(void);
|
void *smc_get_next_ctx(void);
|
||||||
|
|
Loading…
Reference in New Issue