Skip to content

Commit c3b344d

Browse files
mwachs5palmer-dabbelt
authored andcommitted
riscv: Move the initialization of the field inside the structure for consistency
1 parent 459b39e commit c3b344d

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/target/riscv/riscv-013.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -318,13 +318,9 @@ static dmi_status_t dmi_scan(struct target *target, uint16_t *address_in,
318318
struct scan_field field = {
319319
.num_bits = info->abits + DTM_DMI_OP_LENGTH + DTM_DMI_DATA_LENGTH,
320320
.out_value = out,
321+
.in_value = in
321322
};
322323

323-
// We need to always do this so that we can
324-
// get the OP result, even if we don't care about
325-
// the data itself.
326-
field.in_value = in;
327-
328324
assert(info->abits != 0);
329325

330326
buf_set_u64(out, DTM_DMI_OP_OFFSET, DTM_DMI_OP_LENGTH, op);

0 commit comments

Comments
 (0)