target/armv8: Use 'bool' data type for cache validity flag

The variable is already used as boolean value but has the wrong data
type.

Change-Id: Ia54cfbcdad00dc15e1181c05fb97fcbaa435bb21
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/9059
Tested-by: jenkins
Reviewed-by: Richard Allen <rsaxvc@gmail.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
Marc Schink
2025-07-28 07:34:39 +00:00
committed by Antonio Borneo
parent b4d05b6e72
commit 1272796cc5
4 changed files with 8 additions and 8 deletions

View File

@@ -214,7 +214,7 @@ static int armv8_handle_inner_cache_info_command(struct command_invocation *cmd,
{
int cl;
if (armv8_cache->info == -1) {
if (!armv8_cache->info_valid) {
command_print(cmd, "cache not yet identified");
return ERROR_OK;
}
@@ -262,7 +262,7 @@ static int armv8_flush_all_data(struct target *target)
int retval = ERROR_FAIL;
/* check that armv8_cache is correctly identify */
struct armv8_common *armv8 = target_to_armv8(target);
if (armv8->armv8_mmu.armv8_cache.info == -1) {
if (!armv8->armv8_mmu.armv8_cache.info_valid) {
LOG_ERROR("trying to flush un-identified cache");
return retval;
}
@@ -288,7 +288,7 @@ static int armv8_flush_all_instruction(struct target *target)
int retval = ERROR_FAIL;
/* check that armv8_cache is correctly identify */
struct armv8_common *armv8 = target_to_armv8(target);
if (armv8->armv8_mmu.armv8_cache.info == -1) {
if (!armv8->armv8_mmu.armv8_cache.info_valid) {
LOG_ERROR("trying to flush un-identified cache");
return retval;
}
@@ -459,7 +459,7 @@ int armv8_identify_cache(struct armv8_common *armv8)
if (retval != ERROR_OK)
goto done;
armv8->armv8_mmu.armv8_cache.info = 1;
armv8->armv8_mmu.armv8_cache.info_valid = true;
/* if no l2 cache initialize l1 data cache flush function function */
if (!armv8->armv8_mmu.armv8_cache.flush_all_data_cache) {