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>
This commit is contained in:
committed by
Spencer Oliver
parent
517ba0690d
commit
13f6c889ab
@@ -356,7 +356,7 @@ static int jtag_idcode_q_read(struct adiv5_dap *dap,
|
||||
|
||||
fields[0].num_bits = 32;
|
||||
fields[0].out_value = NULL;
|
||||
fields[0].in_value = (void *) data;
|
||||
fields[0].in_value = (uint8_t *) data;
|
||||
|
||||
jtag_add_dr_scan(jtag_info->tap, 1, fields, TAP_IDLE);
|
||||
|
||||
|
||||
@@ -599,7 +599,7 @@ int arm11_run_instr_data_to_core_noack_inner_default(struct jtag_tap *tap,
|
||||
|
||||
uint8_t *ReadyPos = Readies;
|
||||
while (count--) {
|
||||
chain5_fields[0].out_value = (void *)(data++);
|
||||
chain5_fields[0].out_value = (uint8_t *)(data++);
|
||||
chain5_fields[1].in_value = ReadyPos++;
|
||||
|
||||
if (count > 0) {
|
||||
|
||||
@@ -323,7 +323,7 @@ static int do_semihosting(struct target *target)
|
||||
if (l < s)
|
||||
result = -1;
|
||||
else {
|
||||
retval = target_write_buffer(target, a, s, (void *)arg);
|
||||
retval = target_write_buffer(target, a, s, (uint8_t *)arg);
|
||||
if (retval != ERROR_OK)
|
||||
return retval;
|
||||
result = 0;
|
||||
|
||||
+2
-2
@@ -468,7 +468,7 @@ static int armv7a_l2x_cache_init(struct target *target, uint32_t base, uint32_t
|
||||
l2x_cache->base,l2x_cache->way);*/
|
||||
if (armv7a->armv7a_mmu.armv7a_cache.l2_cache)
|
||||
LOG_INFO("cache l2 already initialized\n");
|
||||
armv7a->armv7a_mmu.armv7a_cache.l2_cache = (void *) l2x_cache;
|
||||
armv7a->armv7a_mmu.armv7a_cache.l2_cache = l2x_cache;
|
||||
/* initialize l1 / l2x cache function */
|
||||
armv7a->armv7a_mmu.armv7a_cache.flush_all_data_cache
|
||||
= armv7a_l2x_flush_all_data;
|
||||
@@ -482,7 +482,7 @@ static int armv7a_l2x_cache_init(struct target *target, uint32_t base, uint32_t
|
||||
armv7a = target_to_armv7a(curr);
|
||||
if (armv7a->armv7a_mmu.armv7a_cache.l2_cache)
|
||||
LOG_ERROR("smp target : cache l2 already initialized\n");
|
||||
armv7a->armv7a_mmu.armv7a_cache.l2_cache = (void *) l2x_cache;
|
||||
armv7a->armv7a_mmu.armv7a_cache.l2_cache = l2x_cache;
|
||||
armv7a->armv7a_mmu.armv7a_cache.flush_all_data_cache =
|
||||
armv7a_l2x_flush_all_data;
|
||||
armv7a->armv7a_mmu.armv7a_cache.display_cache_info =
|
||||
|
||||
+2
-2
@@ -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);
|
||||
|
||||
|
||||
@@ -422,7 +422,7 @@ int mips_ejtag_fastdata_scan(struct mips_ejtag *ejtag_info, int write_t, uint32_
|
||||
fields[1].in_value = NULL;
|
||||
buf_set_u32(t, 0, 32, *data);
|
||||
} else
|
||||
fields[1].in_value = (void *) data;
|
||||
fields[1].in_value = (uint8_t *) data;
|
||||
|
||||
jtag_add_dr_scan(tap, 2, fields, TAP_IDLE);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user