target: arm: drop casts commented-out

The function dpm->finish() returns a value that is almost always
ignored.
Drop the commented-out cast
	/* (void) */

Change-Id: I7ff210a2693dd1877b7c7591705cdcd96a2c6125
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8498
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
This commit is contained in:
Antonio Borneo 2024-09-16 13:49:04 +02:00
parent 3ccf68cd0a
commit 8c23e6c175
4 changed files with 17 additions and 17 deletions

View File

@ -59,7 +59,7 @@ static int dpm_mrc(struct target *target, int cpnum,
ARMV4_5_MRC(cpnum, op1, 0, crn, crm, op2), ARMV4_5_MRC(cpnum, op1, 0, crn, crm, op2),
value); value);
/* (void) */ dpm->finish(dpm); dpm->finish(dpm);
return retval; return retval;
} }
@ -82,7 +82,7 @@ static int dpm_mrrc(struct target *target, int cpnum,
ARMV5_T_MRRC(cpnum, op, 0, 1, crm), ARMV5_T_MRRC(cpnum, op, 0, 1, crm),
value); value);
/* (void) */ dpm->finish(dpm); dpm->finish(dpm);
return retval; return retval;
} }
@ -107,7 +107,7 @@ static int dpm_mcr(struct target *target, int cpnum,
ARMV4_5_MCR(cpnum, op1, 0, crn, crm, op2), ARMV4_5_MCR(cpnum, op1, 0, crn, crm, op2),
value); value);
/* (void) */ dpm->finish(dpm); dpm->finish(dpm);
return retval; return retval;
} }
@ -129,7 +129,7 @@ static int dpm_mcrr(struct target *target, int cpnum,
retval = dpm->instr_write_data_r0_r1(dpm, retval = dpm->instr_write_data_r0_r1(dpm,
ARMV5_T_MCRR(cpnum, op, 0, 1, crm), value); ARMV5_T_MCRR(cpnum, op, 0, 1, crm), value);
/* (void) */ dpm->finish(dpm); dpm->finish(dpm);
return retval; return retval;
} }
@ -422,7 +422,7 @@ int arm_dpm_read_current_registers(struct arm_dpm *dpm)
*/ */
fail: fail:
/* (void) */ dpm->finish(dpm); dpm->finish(dpm);
return retval; return retval;
} }
@ -632,7 +632,7 @@ int arm_dpm_write_dirty_registers(struct arm_dpm *dpm, bool bpwp)
cache->reg_list[i].dirty = false; cache->reg_list[i].dirty = false;
} }
/* (void) */ dpm->finish(dpm); dpm->finish(dpm);
done: done:
return retval; return retval;
} }
@ -719,10 +719,10 @@ static int arm_dpm_read_core_reg(struct target *target, struct reg *r,
/* always clean up, regardless of error */ /* always clean up, regardless of error */
if (mode != ARM_MODE_ANY) if (mode != ARM_MODE_ANY)
/* (void) */ arm_dpm_modeswitch(dpm, ARM_MODE_ANY); arm_dpm_modeswitch(dpm, ARM_MODE_ANY);
fail: fail:
/* (void) */ dpm->finish(dpm); dpm->finish(dpm);
return retval; return retval;
} }
@ -761,10 +761,10 @@ static int arm_dpm_write_core_reg(struct target *target, struct reg *r,
/* always clean up, regardless of error */ /* always clean up, regardless of error */
if (mode != ARM_MODE_ANY) if (mode != ARM_MODE_ANY)
/* (void) */ arm_dpm_modeswitch(dpm, ARM_MODE_ANY); arm_dpm_modeswitch(dpm, ARM_MODE_ANY);
fail: fail:
/* (void) */ dpm->finish(dpm); dpm->finish(dpm);
return retval; return retval;
} }
@ -831,7 +831,7 @@ static int arm_dpm_full_context(struct target *target)
} while (did_read); } while (did_read);
retval = arm_dpm_modeswitch(dpm, ARM_MODE_ANY); retval = arm_dpm_modeswitch(dpm, ARM_MODE_ANY);
/* (void) */ dpm->finish(dpm); dpm->finish(dpm);
done: done:
return retval; return retval;
} }

View File

@ -74,7 +74,7 @@ static void armv7a_show_fault_registers(struct target *target)
", IFAR: %8.8" PRIx32, ifsr, ifar); ", IFAR: %8.8" PRIx32, ifsr, ifar);
done: done:
/* (void) */ dpm->finish(dpm); dpm->finish(dpm);
} }

View File

@ -1010,7 +1010,7 @@ static void armv8_show_fault_registers32(struct armv8_common *armv8)
", IFAR: %8.8" PRIx32, ifsr, ifar); ", IFAR: %8.8" PRIx32, ifsr, ifar);
done: done:
/* (void) */ dpm->finish(dpm); dpm->finish(dpm);
} }
static __attribute__((unused)) void armv8_show_fault_registers(struct target *target) static __attribute__((unused)) void armv8_show_fault_registers(struct target *target)

View File

@ -500,7 +500,7 @@ static int dpmv8_mrc(struct target *target, int cpnum,
ARMV4_5_MRC(cpnum, op1, 0, crn, crm, op2), ARMV4_5_MRC(cpnum, op1, 0, crn, crm, op2),
value); value);
/* (void) */ dpm->finish(dpm); dpm->finish(dpm);
return retval; return retval;
} }
@ -525,7 +525,7 @@ static int dpmv8_mcr(struct target *target, int cpnum,
ARMV4_5_MCR(cpnum, op1, 0, crn, crm, op2), ARMV4_5_MCR(cpnum, op1, 0, crn, crm, op2),
value); value);
/* (void) */ dpm->finish(dpm); dpm->finish(dpm);
return retval; return retval;
} }
@ -991,7 +991,7 @@ static int armv8_dpm_read_core_reg(struct target *target, struct reg *r,
goto fail; goto fail;
fail: fail:
/* (void) */ dpm->finish(dpm); dpm->finish(dpm);
return retval; return retval;
} }
@ -1085,7 +1085,7 @@ static int armv8_dpm_full_context(struct target *target)
} while (did_read); } while (did_read);
retval = armv8_dpm_modeswitch(dpm, ARM_MODE_ANY); retval = armv8_dpm_modeswitch(dpm, ARM_MODE_ANY);
/* (void) */ dpm->finish(dpm); dpm->finish(dpm);
done: done:
return retval; return retval;
} }