From c3b344d1c0b6eb60c0845b27cbdd1ee8d45bcd0e Mon Sep 17 00:00:00 2001 From: Megan Wachs Date: Wed, 7 Jun 2017 17:32:31 -0700 Subject: [PATCH] riscv: Move the initialization of the field inside the structure for consistency --- src/target/riscv/riscv-013.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/target/riscv/riscv-013.c b/src/target/riscv/riscv-013.c index 63456db8f..e8be71130 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);