Merge pull request #850 from riscv/cleanup-in-target-c
Minor cleanup in target.c
This commit is contained in:
commit
d78d991191
|
@ -3101,7 +3101,6 @@ COMMAND_HANDLER(handle_reg_command)
|
|||
if (reg->exist == false || reg->hidden)
|
||||
continue;
|
||||
/* only print cached values if they are valid */
|
||||
if (reg->exist) {
|
||||
if (reg->valid) {
|
||||
char *value = buf_to_hex_str(reg->value,
|
||||
reg->size);
|
||||
|
@ -3116,8 +3115,7 @@ COMMAND_HANDLER(handle_reg_command)
|
|||
} else {
|
||||
command_print(CMD, "(%i) %s (/%" PRIu32 ")",
|
||||
count, reg->name,
|
||||
reg->size) ;
|
||||
}
|
||||
reg->size);
|
||||
}
|
||||
}
|
||||
cache = cache->next;
|
||||
|
@ -3173,7 +3171,7 @@ COMMAND_HANDLER(handle_reg_command)
|
|||
if (reg->valid == 0) {
|
||||
int retval = reg->type->get(reg);
|
||||
if (retval != ERROR_OK) {
|
||||
LOG_DEBUG("Couldn't get register %s.", reg->name);
|
||||
LOG_ERROR("Could not read register '%s'", reg->name);
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue