Improved support for W=2 compilation flag by solving some nested-extern
and sign-compare warnings.
The libraries are compiling with warnings (which turn into errors with
the Werror flag).
Outside of libraries, some warnings cannot be fixed.
Change-Id: I06b1923857f2a6a50e93d62d0274915b268cef05
Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
12 files changed:
*/
static unsigned int sec_exec_image_id = INVALID_IMAGE_ID;
*/
static unsigned int sec_exec_image_id = INVALID_IMAGE_ID;
-/* Authentication status of each image. */
-extern unsigned int auth_img_flags[MAX_NUMBER_IDS];
-
/*******************************************************************************
* Top level handler for servicing FWU SMCs.
******************************************************************************/
/*******************************************************************************
* Top level handler for servicing FWU SMCs.
******************************************************************************/
- * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
*
* SPDX-License-Identifier: BSD-3-Clause
*/
int scmi_ap_core_set_reset_addr(void *p, uint64_t reset_addr, uint32_t attr)
{
mailbox_mem_t *mbx_mem;
int scmi_ap_core_set_reset_addr(void *p, uint64_t reset_addr, uint32_t attr)
{
mailbox_mem_t *mbx_mem;
+ unsigned int token = 0;
+ int ret;
scmi_channel_t *ch = (scmi_channel_t *)p;
validate_scmi_channel(ch);
scmi_channel_t *ch = (scmi_channel_t *)p;
validate_scmi_channel(ch);
int scmi_ap_core_get_reset_addr(void *p, uint64_t *reset_addr, uint32_t *attr)
{
mailbox_mem_t *mbx_mem;
int scmi_ap_core_get_reset_addr(void *p, uint64_t *reset_addr, uint32_t *attr)
{
mailbox_mem_t *mbx_mem;
+ unsigned int token = 0;
+ int ret;
scmi_channel_t *ch = (scmi_channel_t *)p;
uint32_t lo_addr, hi_addr;
scmi_channel_t *ch = (scmi_channel_t *)p;
uint32_t lo_addr, hi_addr;
- * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
*
* SPDX-License-Identifier: BSD-3-Clause
*/
int scmi_proto_version(void *p, uint32_t proto_id, uint32_t *version)
{
mailbox_mem_t *mbx_mem;
int scmi_proto_version(void *p, uint32_t proto_id, uint32_t *version)
{
mailbox_mem_t *mbx_mem;
+ unsigned int token = 0;
+ int ret;
scmi_channel_t *ch = (scmi_channel_t *)p;
validate_scmi_channel(ch);
scmi_channel_t *ch = (scmi_channel_t *)p;
validate_scmi_channel(ch);
uint32_t command_id, uint32_t *attr)
{
mailbox_mem_t *mbx_mem;
uint32_t command_id, uint32_t *attr)
{
mailbox_mem_t *mbx_mem;
+ unsigned int token = 0;
+ int ret;
scmi_channel_t *ch = (scmi_channel_t *)p;
validate_scmi_channel(ch);
scmi_channel_t *ch = (scmi_channel_t *)p;
validate_scmi_channel(ch);
- * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
*
* SPDX-License-Identifier: BSD-3-Clause
*/
uint32_t scmi_pwr_state)
{
mailbox_mem_t *mbx_mem;
uint32_t scmi_pwr_state)
{
mailbox_mem_t *mbx_mem;
+ unsigned int token = 0;
+ int ret;
/*
* Only asynchronous mode of `set power state` command is allowed on
/*
* Only asynchronous mode of `set power state` command is allowed on
uint32_t *scmi_pwr_state)
{
mailbox_mem_t *mbx_mem;
uint32_t *scmi_pwr_state)
{
mailbox_mem_t *mbx_mem;
+ unsigned int token = 0;
+ int ret;
scmi_channel_t *ch = (scmi_channel_t *)p;
validate_scmi_channel(ch);
scmi_channel_t *ch = (scmi_channel_t *)p;
validate_scmi_channel(ch);
- * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
*
* SPDX-License-Identifier: BSD-3-Clause
*/
int scmi_sys_pwr_state_set(void *p, uint32_t flags, uint32_t system_state)
{
mailbox_mem_t *mbx_mem;
int scmi_sys_pwr_state_set(void *p, uint32_t flags, uint32_t system_state)
{
mailbox_mem_t *mbx_mem;
+ unsigned int token = 0;
+ int ret;
scmi_channel_t *ch = (scmi_channel_t *)p;
validate_scmi_channel(ch);
scmi_channel_t *ch = (scmi_channel_t *)p;
validate_scmi_channel(ch);
int scmi_sys_pwr_state_get(void *p, uint32_t *system_state)
{
mailbox_mem_t *mbx_mem;
int scmi_sys_pwr_state_get(void *p, uint32_t *system_state)
{
mailbox_mem_t *mbx_mem;
+ unsigned int token = 0;
+ int ret;
scmi_channel_t *ch = (scmi_channel_t *)p;
validate_scmi_channel(ch);
scmi_channel_t *ch = (scmi_channel_t *)p;
validate_scmi_channel(ch);
- * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
*
* SPDX-License-Identifier: BSD-3-Clause
*/
return;
}
#if !HW_ASSISTED_COHERENCY
return;
}
#if !HW_ASSISTED_COHERENCY
uint32_t scmi_pwr_state = 0;
/*
* If we reach here, then assert that power down at system power domain
uint32_t scmi_pwr_state = 0;
/*
* If we reach here, then assert that power down at system power domain
*/
void css_scp_off(const struct psci_power_state *target_state)
{
*/
void css_scp_off(const struct psci_power_state *target_state)
{
+ unsigned int lvl = 0;
+ int ret;
uint32_t scmi_pwr_state = 0;
/* At-least the CPU level should be specified to be OFF */
uint32_t scmi_pwr_state = 0;
/* At-least the CPU level should be specified to be OFF */
*/
void css_scp_on(u_register_t mpidr)
{
*/
void css_scp_on(u_register_t mpidr)
{
- int lvl = 0, ret, core_pos;
+ unsigned int lvl = 0;
+ int ret, core_pos;
uint32_t scmi_pwr_state = 0;
for (; lvl <= PLAT_MAX_PWR_LVL; lvl++)
uint32_t scmi_pwr_state = 0;
for (; lvl <= PLAT_MAX_PWR_LVL; lvl++)
- * Copyright (c) 2015, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2015-2019, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <assert.h>
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <assert.h>
+#include <drivers/arm/sp804_delay_timer.h>
#include <drivers/delay_timer.h>
#include <lib/mmio.h>
#include <drivers/delay_timer.h>
#include <lib/mmio.h>
- * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2015-2019, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#pragma weak plat_set_nv_ctr2
#pragma weak plat_set_nv_ctr2
-/* Pointer to CoT */
-extern const auth_img_desc_t *const cot_desc_ptr;
-extern unsigned int auth_img_flags[MAX_NUMBER_IDS];
-
static int cmp_auth_param_type_desc(const auth_param_type_desc_t *a,
const auth_param_type_desc_t *b)
{
static int cmp_auth_param_type_desc(const auth_param_type_desc_t *a,
const auth_param_type_desc_t *b)
{
console_t *console_list;
uint8_t console_state = CONSOLE_FLAG_BOOT;
console_t *console_list;
uint8_t console_state = CONSOLE_FLAG_BOOT;
+IMPORT_SYM(console_t *, __STACKS_START__, stacks_start)
+IMPORT_SYM(console_t *, __STACKS_END__, stacks_end)
+
int console_register(console_t *console)
{
int console_register(console_t *console)
{
- IMPORT_SYM(console_t *, __STACKS_START__, stacks_start)
- IMPORT_SYM(console_t *, __STACKS_END__, stacks_end)
-
/* Assert that the struct is not on the stack (common mistake). */
assert((console < stacks_start) || (console >= stacks_end));
/* Assert that we won't make a circle in the list. */
/* Assert that the struct is not on the stack (common mistake). */
assert((console < stacks_start) || (console >= stacks_end));
/* Assert that we won't make a circle in the list. */
- * Copyright (c) 2013-2014, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2013-2019, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
*
* SPDX-License-Identifier: BSD-3-Clause
*/
long semihosting_get_flen(const char *file_name)
{
long file_handle;
long semihosting_get_flen(const char *file_name)
{
long file_handle;
assert(semihosting_connection_supported());
assert(semihosting_connection_supported());
******************************************************************************/
int plat_arm_bl1_fwu_needed(void)
{
******************************************************************************/
int plat_arm_bl1_fwu_needed(void)
{
- const uint32_t *nv_flags_ptr = (const uint32_t *)V2M_SYS_NVFLAGS_ADDR;
+ const int32_t *nv_flags_ptr = (const int32_t *)V2M_SYS_NVFLAGS_ADDR;
/* Check if TOC is invalid or watchdog reset happened. */
if ((arm_io_is_toc_valid() != 1) ||
/* Check if TOC is invalid or watchdog reset happened. */
if ((arm_io_is_toc_valid() != 1) ||
- for (int i = 0; i < ARRAY_SIZE(responses); i++) {
+ for (unsigned int i = 0U; i < ARRAY_SIZE(responses); i++) {
struct sprt_response *resp = &(responses[i]);
if (resp->is_valid == 0) {
struct sprt_response *resp = &(responses[i]);
if (resp->is_valid == 0) {