forked from auracaster/openocd
OpenOCD: fix code indentation
Fix checkpatch errors ERROR:SUSPECT_CODE_INDENT: suspect code indent for conditional statements Change-Id: I94d4fa5720c25dd2fb0334a824cd9026babcce4e Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8497 Tested-by: jenkins
This commit is contained in:
@@ -1324,21 +1324,21 @@ static int cortex_a_set_breakpoint(struct target *target,
|
||||
brp_list[brp_i].value);
|
||||
} else if (breakpoint->type == BKPT_SOFT) {
|
||||
uint8_t code[4];
|
||||
/* length == 2: Thumb breakpoint */
|
||||
if (breakpoint->length == 2)
|
||||
if (breakpoint->length == 2) {
|
||||
/* length == 2: Thumb breakpoint */
|
||||
buf_set_u32(code, 0, 32, ARMV5_T_BKPT(0x11));
|
||||
else
|
||||
/* length == 3: Thumb-2 breakpoint, actual encoding is
|
||||
* a regular Thumb BKPT instruction but we replace a
|
||||
* 32bit Thumb-2 instruction, so fix-up the breakpoint
|
||||
* length
|
||||
*/
|
||||
if (breakpoint->length == 3) {
|
||||
} else if (breakpoint->length == 3) {
|
||||
/* length == 3: Thumb-2 breakpoint, actual encoding is
|
||||
* a regular Thumb BKPT instruction but we replace a
|
||||
* 32bit Thumb-2 instruction, so fix-up the breakpoint
|
||||
* length
|
||||
*/
|
||||
buf_set_u32(code, 0, 32, ARMV5_T_BKPT(0x11));
|
||||
breakpoint->length = 4;
|
||||
} else
|
||||
} else {
|
||||
/* length == 4, normal ARM breakpoint */
|
||||
buf_set_u32(code, 0, 32, ARMV5_BKPT(0x11));
|
||||
}
|
||||
|
||||
retval = target_read_memory(target,
|
||||
breakpoint->address & 0xFFFFFFFE,
|
||||
@@ -1348,8 +1348,7 @@ static int cortex_a_set_breakpoint(struct target *target,
|
||||
return retval;
|
||||
|
||||
/* make sure data cache is cleaned & invalidated down to PoC */
|
||||
armv7a_cache_flush_virt(target, breakpoint->address,
|
||||
breakpoint->length);
|
||||
armv7a_cache_flush_virt(target, breakpoint->address, breakpoint->length);
|
||||
|
||||
retval = target_write_memory(target,
|
||||
breakpoint->address & 0xFFFFFFFE,
|
||||
@@ -1358,10 +1357,8 @@ static int cortex_a_set_breakpoint(struct target *target,
|
||||
return retval;
|
||||
|
||||
/* update i-cache at breakpoint location */
|
||||
armv7a_l1_d_cache_inval_virt(target, breakpoint->address,
|
||||
breakpoint->length);
|
||||
armv7a_l1_i_cache_inval_virt(target, breakpoint->address,
|
||||
breakpoint->length);
|
||||
armv7a_l1_d_cache_inval_virt(target, breakpoint->address, breakpoint->length);
|
||||
armv7a_l1_i_cache_inval_virt(target, breakpoint->address, breakpoint->length);
|
||||
|
||||
breakpoint->is_set = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user