diff options
author | Ambroise Vincent <ambroise.vincent@arm.com> | 2019-02-14 09:48:21 +0000 |
---|---|---|
committer | Ambroise Vincent <ambroise.vincent@arm.com> | 2019-04-01 10:43:42 +0100 |
commit | bde2836fcc23e8cb98dfa0250937e6d771b260b7 (patch) | |
tree | dc66660c7e751147d7d843c1937f905f17973830 /drivers | |
parent | 609e053caabf0807a71243eec11f49120eaaab61 (diff) |
Remove several warnings reported with W=2
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/arm/css/scmi/scmi_ap_core_proto.c | 8 | ||||
-rw-r--r-- | drivers/arm/css/scmi/scmi_common.c | 8 | ||||
-rw-r--r-- | drivers/arm/css/scmi/scmi_pwr_dmn_proto.c | 8 | ||||
-rw-r--r-- | drivers/arm/css/scmi/scmi_sys_pwr_proto.c | 8 | ||||
-rw-r--r-- | drivers/arm/css/scp/css_pm_scmi.c | 10 | ||||
-rw-r--r-- | drivers/arm/sp804/sp804_delay_timer.c | 3 | ||||
-rw-r--r-- | drivers/auth/auth_mod.c | 6 | ||||
-rw-r--r-- | drivers/console/multi_console.c | 6 |
8 files changed, 32 insertions, 25 deletions
diff --git a/drivers/arm/css/scmi/scmi_ap_core_proto.c b/drivers/arm/css/scmi/scmi_ap_core_proto.c index 2caccc2b..5941b87f 100644 --- a/drivers/arm/css/scmi/scmi_ap_core_proto.c +++ b/drivers/arm/css/scmi/scmi_ap_core_proto.c @@ -1,5 +1,5 @@ /* - * 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 */ @@ -18,7 +18,8 @@ int scmi_ap_core_set_reset_addr(void *p, uint64_t reset_addr, uint32_t attr) { mailbox_mem_t *mbx_mem; - int token = 0, ret; + unsigned int token = 0; + int ret; scmi_channel_t *ch = (scmi_channel_t *)p; validate_scmi_channel(ch); @@ -51,7 +52,8 @@ int scmi_ap_core_set_reset_addr(void *p, uint64_t reset_addr, uint32_t attr) int scmi_ap_core_get_reset_addr(void *p, uint64_t *reset_addr, uint32_t *attr) { mailbox_mem_t *mbx_mem; - int token = 0, ret; + unsigned int token = 0; + int ret; scmi_channel_t *ch = (scmi_channel_t *)p; uint32_t lo_addr, hi_addr; diff --git a/drivers/arm/css/scmi/scmi_common.c b/drivers/arm/css/scmi/scmi_common.c index e2c353d8..5b3724ac 100644 --- a/drivers/arm/css/scmi/scmi_common.c +++ b/drivers/arm/css/scmi/scmi_common.c @@ -1,5 +1,5 @@ /* - * 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 */ @@ -90,7 +90,8 @@ void scmi_put_channel(scmi_channel_t *ch) int scmi_proto_version(void *p, uint32_t proto_id, uint32_t *version) { mailbox_mem_t *mbx_mem; - int token = 0, ret; + unsigned int token = 0; + int ret; scmi_channel_t *ch = (scmi_channel_t *)p; validate_scmi_channel(ch); @@ -122,7 +123,8 @@ int scmi_proto_msg_attr(void *p, uint32_t proto_id, uint32_t command_id, uint32_t *attr) { mailbox_mem_t *mbx_mem; - int token = 0, ret; + unsigned int token = 0; + int ret; scmi_channel_t *ch = (scmi_channel_t *)p; validate_scmi_channel(ch); diff --git a/drivers/arm/css/scmi/scmi_pwr_dmn_proto.c b/drivers/arm/css/scmi/scmi_pwr_dmn_proto.c index 70165dec..a342aa89 100644 --- a/drivers/arm/css/scmi/scmi_pwr_dmn_proto.c +++ b/drivers/arm/css/scmi/scmi_pwr_dmn_proto.c @@ -1,5 +1,5 @@ /* - * 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 */ @@ -19,7 +19,8 @@ int scmi_pwr_state_set(void *p, uint32_t domain_id, uint32_t scmi_pwr_state) { mailbox_mem_t *mbx_mem; - int token = 0, ret; + unsigned int token = 0; + int ret; /* * Only asynchronous mode of `set power state` command is allowed on @@ -59,7 +60,8 @@ int scmi_pwr_state_get(void *p, uint32_t domain_id, uint32_t *scmi_pwr_state) { mailbox_mem_t *mbx_mem; - int token = 0, ret; + unsigned int token = 0; + int ret; scmi_channel_t *ch = (scmi_channel_t *)p; validate_scmi_channel(ch); diff --git a/drivers/arm/css/scmi/scmi_sys_pwr_proto.c b/drivers/arm/css/scmi/scmi_sys_pwr_proto.c index a27c4a5d..c8e62d15 100644 --- a/drivers/arm/css/scmi/scmi_sys_pwr_proto.c +++ b/drivers/arm/css/scmi/scmi_sys_pwr_proto.c @@ -1,5 +1,5 @@ /* - * 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 */ @@ -18,7 +18,8 @@ int scmi_sys_pwr_state_set(void *p, uint32_t flags, uint32_t system_state) { mailbox_mem_t *mbx_mem; - int token = 0, ret; + unsigned int token = 0; + int ret; scmi_channel_t *ch = (scmi_channel_t *)p; validate_scmi_channel(ch); @@ -50,7 +51,8 @@ int scmi_sys_pwr_state_set(void *p, uint32_t flags, uint32_t system_state) int scmi_sys_pwr_state_get(void *p, uint32_t *system_state) { mailbox_mem_t *mbx_mem; - int token = 0, ret; + unsigned int token = 0; + int ret; scmi_channel_t *ch = (scmi_channel_t *)p; validate_scmi_channel(ch); diff --git a/drivers/arm/css/scp/css_pm_scmi.c b/drivers/arm/css/scp/css_pm_scmi.c index 1966c44c..8dbefa16 100644 --- a/drivers/arm/css/scp/css_pm_scmi.c +++ b/drivers/arm/css/scp/css_pm_scmi.c @@ -1,5 +1,5 @@ /* - * 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 */ @@ -99,7 +99,7 @@ void css_scp_suspend(const struct psci_power_state *target_state) return; } #if !HW_ASSISTED_COHERENCY - int lvl; + unsigned int lvl; uint32_t scmi_pwr_state = 0; /* * If we reach here, then assert that power down at system power domain @@ -145,7 +145,8 @@ void css_scp_suspend(const struct psci_power_state *target_state) */ void css_scp_off(const struct psci_power_state *target_state) { - int lvl = 0, ret; + unsigned int lvl = 0; + int ret; uint32_t scmi_pwr_state = 0; /* At-least the CPU level should be specified to be OFF */ @@ -184,7 +185,8 @@ void css_scp_off(const struct psci_power_state *target_state) */ 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++) diff --git a/drivers/arm/sp804/sp804_delay_timer.c b/drivers/arm/sp804/sp804_delay_timer.c index 5313fbde..9c5e7628 100644 --- a/drivers/arm/sp804/sp804_delay_timer.c +++ b/drivers/arm/sp804/sp804_delay_timer.c @@ -1,11 +1,12 @@ /* - * 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> +#include <drivers/arm/sp804_delay_timer.h> #include <drivers/delay_timer.h> #include <lib/mmio.h> diff --git a/drivers/auth/auth_mod.c b/drivers/auth/auth_mod.c index 1b8ff82b..97e12203 100644 --- a/drivers/auth/auth_mod.c +++ b/drivers/auth/auth_mod.c @@ -1,5 +1,5 @@ /* - * 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 */ @@ -30,10 +30,6 @@ #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) { diff --git a/drivers/console/multi_console.c b/drivers/console/multi_console.c index a1359592..b5ff88b7 100644 --- a/drivers/console/multi_console.c +++ b/drivers/console/multi_console.c @@ -13,11 +13,11 @@ 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) { - 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. */ |