aboutsummaryrefslogtreecommitdiff
path: root/src/target/etm.c
diff options
context:
space:
mode:
authorAndreas Fritiofson <andreas.fritiofson@gmail.com>2013-09-28 17:28:25 +0200
committerSpencer Oliver <spen@spen-soft.co.uk>2013-10-31 20:42:47 +0000
commit13f6c889ab9b6e5b1c4f48fca9807fdc1fb83f42 (patch)
treefd5412ade9345f19316dcbee5ea39f961f34509a /src/target/etm.c
parent517ba0690dcc9e859a05df2113ce32401a5ab254 (diff)
downloadriscv-openocd-13f6c889ab9b6e5b1c4f48fca9807fdc1fb83f42.zip
riscv-openocd-13f6c889ab9b6e5b1c4f48fca9807fdc1fb83f42.tar.gz
riscv-openocd-13f6c889ab9b6e5b1c4f48fca9807fdc1fb83f42.tar.bz2
Remove unnecessary (void *)
When pointer casts are needed, cast directly to the correct type, instead of going via void*. Don't explicitly cast to void* if it would have been done implicitly. Change-Id: I4093209200051c5eb62847d00a4b9c8567480068 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1669 Tested-by: jenkins Reviewed-by: Mathias Küster <kesmtp@freenet.de> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Diffstat (limited to 'src/target/etm.c')
-rw-r--r--src/target/etm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/target/etm.c b/src/target/etm.c
index be5dd02..ebffd48 100644
--- a/src/target/etm.c
+++ b/src/target/etm.c
@@ -318,7 +318,7 @@ struct reg_cache *etm_build_reg_cache(struct target *target,
etm_core, 1);
etm_get_reg(reg_list);
- etm_ctx->config = buf_get_u32((void *)&arch_info->value, 0, 32);
+ etm_ctx->config = buf_get_u32(&arch_info->value, 0, 32);
config = etm_ctx->config;
/* figure ETM version then add base registers */
@@ -334,7 +334,7 @@ struct reg_cache *etm_build_reg_cache(struct target *target,
etm_core + 1, 1);
etm_get_reg(reg_list + 1);
etm_ctx->id = buf_get_u32(
- (void *)&arch_info[1].value, 0, 32);
+ &arch_info[1].value, 0, 32);
LOG_DEBUG("ETM ID: %08x", (unsigned) etm_ctx->id);
bcd_vers = 0x10 + (((etm_ctx->id) >> 4) & 0xff);