aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Dykes <mark.dykes@arm.com>2021-10-14 23:25:28 +0200
committerTrustedFirmware Code Review <review@review.trustedfirmware.org>2021-10-14 23:25:28 +0200
commit09665c83484b3e730814e368df80129598573bd9 (patch)
treed2c03c106a6c83b6c4d1d6620fa5cd022695581e
parent7b97cf378acc7eb77955d19a2faf75d47ad8999f (diff)
parent5657decc7ffa1376c0a97b6d14ea1428877f5af4 (diff)
downloadtrusted-firmware-a-09665c83484b3e730814e368df80129598573bd9.tar.gz
Merge "fix(plat/st): correct signedness comparison issue" into integration
-rw-r--r--plat/st/stm32mp1/stm32mp1_shared_resources.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/plat/st/stm32mp1/stm32mp1_shared_resources.c b/plat/st/stm32mp1/stm32mp1_shared_resources.c
index 208e34a8b0..6b1bcaa131 100644
--- a/plat/st/stm32mp1/stm32mp1_shared_resources.c
+++ b/plat/st/stm32mp1/stm32mp1_shared_resources.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2020, STMicroelectronics - All Rights Reserved
+ * Copyright (c) 2017-2021, STMicroelectronics - All Rights Reserved
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -114,7 +114,7 @@ static unsigned int get_gpio_nbpin(unsigned int bank)
if (bank != GPIO_BANK_Z) {
int count = fdt_get_gpio_bank_pin_count(bank);
- assert((count >= 0) || (count <= (GPIO_PIN_MAX + 1)));
+ assert((count >= 0) && ((unsigned int)count <= (GPIO_PIN_MAX + 1)));
return (unsigned int)count;
}
@@ -163,7 +163,7 @@ static void register_periph(enum stm32mp_shres id, unsigned int state)
if ((id >= STM32MP1_SHRES_GPIOZ(0)) &&
(id <= STM32MP1_SHRES_GPIOZ(7)) &&
- ((id - STM32MP1_SHRES_GPIOZ(0)) >= get_gpioz_nbpin())) {
+ ((unsigned int)(id - STM32MP1_SHRES_GPIOZ(0)) >= get_gpioz_nbpin())) {
ERROR("Invalid GPIO pin %u, %u pin(s) available\n",
id - STM32MP1_SHRES_GPIOZ(0), get_gpioz_nbpin());
panic();