aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMegan Wachs <megan@sifive.com>2017-06-07 17:32:31 -0700
committerPalmer Dabbelt <palmer@dabbelt.com>2017-06-07 21:06:33 -0700
commitc3b344d1c0b6eb60c0845b27cbdd1ee8d45bcd0e (patch)
tree74d91523aad687b53f03851ab305193540ca38fd
parent459b39ec67bbbe2ea0a192344c5236518da79c65 (diff)
downloadriscv-openocd-c3b344d1c0b6eb60c0845b27cbdd1ee8d45bcd0e.zip
riscv-openocd-c3b344d1c0b6eb60c0845b27cbdd1ee8d45bcd0e.tar.gz
riscv-openocd-c3b344d1c0b6eb60c0845b27cbdd1ee8d45bcd0e.tar.bz2
riscv: Move the initialization of the field inside the structure for consistency
-rw-r--r--src/target/riscv/riscv-013.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/target/riscv/riscv-013.c b/src/target/riscv/riscv-013.c
index 63456db..e8be711 100644
--- a/src/target/riscv/riscv-013.c
+++ b/src/target/riscv/riscv-013.c
@@ -318,13 +318,9 @@ static dmi_status_t dmi_scan(struct target *target, uint16_t *address_in,
struct scan_field field = {
.num_bits = info->abits + DTM_DMI_OP_LENGTH + DTM_DMI_DATA_LENGTH,
.out_value = out,
+ .in_value = in
};
- // We need to always do this so that we can
- // get the OP result, even if we don't care about
- // the data itself.
- field.in_value = in;
-
assert(info->abits != 0);
buf_set_u64(out, DTM_DMI_OP_OFFSET, DTM_DMI_OP_LENGTH, op);