Skip to content

Commit

Permalink
Merge pull request #99 from riscv/cast
Browse files Browse the repository at this point in the history
Remove some unnecessary casts.
  • Loading branch information
timsifive authored Aug 15, 2017
2 parents 45f2808 + 5c39079 commit 66806aa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/target/riscv/riscv-013.c
Original file line number Diff line number Diff line change
Expand Up @@ -1319,7 +1319,7 @@ static int read_memory(struct target *target, target_addr_t address,
}

uint32_t value = riscv_program_read_ram(&program, r_data);
LOG_DEBUG("M[0x%" TARGET_PRIxADDR "] reads 0x%08lx", address, (long)value);
LOG_DEBUG("M[0x%" TARGET_PRIxADDR "] reads 0x%08x", address, value);
switch (size) {
case 1:
buffer[0] = value;
Expand Down Expand Up @@ -1466,7 +1466,7 @@ static int read_memory(struct target *target, target_addr_t address,
return ERROR_FAIL;
}

LOG_DEBUG("M[0x%08lx] reads 0x%08lx", (long)t_addr, (long)value);
LOG_DEBUG("M[0x%08lx] reads 0x%08x", (long)t_addr, value);
}
riscv_batch_free(batch);
}
Expand Down Expand Up @@ -1555,7 +1555,7 @@ static int write_memory(struct target *target, target_addr_t address,
}
riscv_program_write_ram(&program, r_data, value);

LOG_DEBUG("M[0x%08lx] writes 0x%08lx", (long)address, (long)value);
LOG_DEBUG("M[0x%08lx] writes 0x%08x", (long)address, value);

if (riscv_program_exec(&program, target) != ERROR_OK) {
uint32_t acs = dmi_read(target, DMI_ABSTRACTCS);
Expand Down Expand Up @@ -1615,7 +1615,7 @@ static int write_memory(struct target *target, target_addr_t address,
return ERROR_FAIL;
}

LOG_DEBUG("M[0x%08lx] writes 0x%08lx", (long)t_addr, (long)value);
LOG_DEBUG("M[0x%08lx] writes 0x%08x", (long)t_addr, value);

riscv_batch_add_dmi_write(
batch,
Expand Down

0 comments on commit 66806aa

Please sign in to comment.