Compiling wake_coldboot_harts() with GCC 11 and -Wextra yields:
lib/sbi/sbi_init.c:208:27:
error: comparison of integer expressions of different signedness:
‘int’ and ‘u32’ {aka ‘unsigned int’} [-Werror=sign-compare]
208 | for (int i = 0; i <= sbi_scratch_last_hartid(); i++) {
| ^~
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Xiang W <wxjstz@126.com>
spin_lock(&coldboot_lock);
/* Send an IPI to all HARTs waiting for coldboot */
- for (int i = 0; i <= sbi_scratch_last_hartid(); i++) {
+ for (u32 i = 0; i <= sbi_scratch_last_hartid(); i++) {
if ((i != hartid) &&
sbi_hartmask_test_hart(i, &coldboot_wait_hmask))
sbi_ipi_raw_send(i);