Skip to content

Commit

Permalink
OpenOCD: fix code alignment
Browse files Browse the repository at this point in the history
Fix checkpatch errors:

	ERROR:TABSTOP: Statements should start on a tabstop

Change-Id: Ia771e7b7fa2cc4ef0be7f52b670525175555c8e4
Signed-off-by: Antonio Borneo <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/8493
Reviewed-by: zapb <[email protected]>
Tested-by: jenkins
  • Loading branch information
borneoa committed Oct 5, 2024
1 parent 537793b commit 4214fca
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/flash/nor/ocl.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ static int ocl_write(struct flash_bank *bank, const uint8_t *buffer, uint32_t of
retval = embeddedice_send(ocl->jtag_info, dcc_buffer, dcc_bufptr-dcc_buffer);
if (retval != ERROR_OK) {
free(dcc_buffer);
return retval;
return retval;
}

/* wait for response, fixed timeout of 1 s */
Expand Down
16 changes: 8 additions & 8 deletions src/jtag/drivers/buspirate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1442,7 +1442,7 @@ static void buspirate_swd_read_reg(uint8_t cmd, uint32_t *value, uint32_t ap_del
data);

switch (ack) {
case SWD_ACK_OK:
case SWD_ACK_OK:
if (parity != parity_u32(data)) {
LOG_DEBUG("Read data parity mismatch %x %x", parity, parity_u32(data));
queued_retval = ERROR_FAIL;
Expand All @@ -1453,15 +1453,15 @@ static void buspirate_swd_read_reg(uint8_t cmd, uint32_t *value, uint32_t ap_del
if (cmd & SWD_CMD_APNDP)
buspirate_swd_idle_clocks(ap_delay_clk);
return;
case SWD_ACK_WAIT:
case SWD_ACK_WAIT:
LOG_DEBUG("SWD_ACK_WAIT");
buspirate_swd_clear_sticky_errors();
return;
case SWD_ACK_FAULT:
case SWD_ACK_FAULT:
LOG_DEBUG("SWD_ACK_FAULT");
queued_retval = ack;
return;
default:
default:
LOG_DEBUG("No valid acknowledge: ack=%d", ack);
queued_retval = ack;
return;
Expand Down Expand Up @@ -1500,19 +1500,19 @@ static void buspirate_swd_write_reg(uint8_t cmd, uint32_t value, uint32_t ap_del
value);

switch (ack) {
case SWD_ACK_OK:
case SWD_ACK_OK:
if (cmd & SWD_CMD_APNDP)
buspirate_swd_idle_clocks(ap_delay_clk);
return;
case SWD_ACK_WAIT:
case SWD_ACK_WAIT:
LOG_DEBUG("SWD_ACK_WAIT");
buspirate_swd_clear_sticky_errors();
return;
case SWD_ACK_FAULT:
case SWD_ACK_FAULT:
LOG_DEBUG("SWD_ACK_FAULT");
queued_retval = ack;
return;
default:
default:
LOG_DEBUG("No valid acknowledge: ack=%d", ack);
queued_retval = ack;
return;
Expand Down
2 changes: 1 addition & 1 deletion src/jtag/hla/hla_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ static const struct command_registration hl_interface_subcommand_handlers[] = {
.help = "select which ST-Link backend to use",
.usage = "usb | tcp [port]",
},
{
{
.name = "command",
.handler = &interface_handle_hla_command,
.mode = COMMAND_EXEC,
Expand Down
6 changes: 3 additions & 3 deletions src/target/mips32_pracc.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ static int mips32_pracc_exec(struct mips_ejtag *ejtag_info, struct pracc_queue_i
store_pending--;

} else { /* read/fetch access */
if (!final_check) { /* executing function code */
if (!final_check) { /* executing function code */
/* check address */
if (ejtag_info->pa_addr != (MIPS32_PRACC_TEXT + code_count * 4)) {
LOG_DEBUG("reading at unexpected address %" PRIx32 ", expected %x",
Expand Down Expand Up @@ -243,7 +243,7 @@ static int mips32_pracc_exec(struct mips_ejtag *ejtag_info, struct pracc_queue_i
if (code_count == ctx->code_count) /* last instruction, start final check */
final_check = 1;

} else { /* final check after function code shifted out */
} else { /* final check after function code shifted out */
/* check address */
if (ejtag_info->pa_addr == MIPS32_PRACC_TEXT) {
if (!pass) { /* first pass through pracc text */
Expand Down Expand Up @@ -275,7 +275,7 @@ static int mips32_pracc_exec(struct mips_ejtag *ejtag_info, struct pracc_queue_i
}
instr = MIPS32_NOP; /* shift out NOPs instructions */
code_count++;
}
}

/* Send instruction out */
mips_ejtag_set_instr(ejtag_info, EJTAG_INST_DATA);
Expand Down
2 changes: 1 addition & 1 deletion src/target/openrisc/or1k_du_adv.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ static int adbg_ctrl_read(struct or1k_jtag *jtag_info, uint32_t regidx,
default:
LOG_ERROR("Illegal debug chain selected (%i) while doing control read",
jtag_info->or1k_jtag_module_selected);
return ERROR_FAIL;
return ERROR_FAIL;
}

/* Zero MSB = op for module, not top-level debug unit */
Expand Down

0 comments on commit 4214fca

Please sign in to comment.