target: Make use of str_enabled_disabled()
The data type changes introduced in [1,2] lead to implicit casts from a boolean to an integer value in the string selection between "enabled" and "disabled". Use str_enabled_disabled() to get rid of this implicit cast. [1] https://review.openocd.org/c/openocd/+/8988 [2] https://review.openocd.org/c/openocd/+/8992 Change-Id: Ia98abdd43b42f394f5bf0aa845017dfbb0e087fd Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/9007 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
committed by
Antonio Borneo
parent
bd32290864
commit
c2b8f994bf
@@ -14,6 +14,7 @@
|
||||
|
||||
#include "arm720t.h"
|
||||
#include <helper/time_support.h>
|
||||
#include <helper/string_choices.h>
|
||||
#include "target_type.h"
|
||||
#include "register.h"
|
||||
#include "arm_opcodes.h"
|
||||
@@ -227,14 +228,10 @@ static int arm720t_arch_state(struct target *target)
|
||||
{
|
||||
struct arm720t_common *arm720t = target_to_arm720(target);
|
||||
|
||||
static const char *state[] = {
|
||||
"disabled", "enabled"
|
||||
};
|
||||
|
||||
arm_arch_state(target);
|
||||
LOG_USER("MMU: %s, Cache: %s",
|
||||
state[arm720t->armv4_5_mmu.mmu_enabled],
|
||||
state[arm720t->armv4_5_mmu.armv4_5_cache.d_u_cache_enabled]);
|
||||
str_enabled_disabled(arm720t->armv4_5_mmu.mmu_enabled),
|
||||
str_enabled_disabled(arm720t->armv4_5_mmu.armv4_5_cache.d_u_cache_enabled));
|
||||
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user