coding style: remove useless break after a goto or return
In a switch/case statement, a break placed after a goto or return is never executed. The script checkpatch available in Linux kernel v5.1 issues a warning for such unused break statements. In the process of reviewing the new checkpatch for its inclusion in OpenOCD, let's get rid of these warnings. The script checkpatch is unable to fixup automatically this case. Thanks to having "break" command using a single code line, this patch has been generated using the script below: find src/ -type f -exec ./tools/scripts/checkpatch.pl -q \ --types UNNECESSARY_BREAK -f {} \; \ | sed -n '/^#/{s/^.*FILE: //;s/:$//;s/:/ /;p}' \ | awk 'function P() {print "sed -i '\''"b"'\'' "a}; { if ($1!=a) { if (a) {P()}; a=$1; b=$2"{d}"; } else { b=b";"$2"{d}" } }; END {P()}' Change-Id: I56ca098faa5fe8d1e3f712dc0a029a3f10559d99 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5617 Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Tested-by: jenkins
This commit is contained in:
parent
5df5e89cf3
commit
9b29cb58ac
|
@ -685,7 +685,6 @@ static int do_data_output(struct nand_device *nand)
|
||||||
case 2 << 2:
|
case 2 << 2:
|
||||||
LOG_DEBUG("main area readed with more than 1 (incorrectable) error");
|
LOG_DEBUG("main area readed with more than 1 (incorrectable) error");
|
||||||
return ERROR_NAND_OPERATION_FAILED;
|
return ERROR_NAND_OPERATION_FAILED;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
switch (ecc_status & 0x0003) {
|
switch (ecc_status & 0x0003) {
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -694,7 +693,6 @@ static int do_data_output(struct nand_device *nand)
|
||||||
case 2:
|
case 2:
|
||||||
LOG_DEBUG("main area readed with more than 1 (incorrectable) error");
|
LOG_DEBUG("main area readed with more than 1 (incorrectable) error");
|
||||||
return ERROR_NAND_OPERATION_FAILED;
|
return ERROR_NAND_OPERATION_FAILED;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -874,7 +874,6 @@ int ecc_status_v1(struct nand_device *nand)
|
||||||
case 2 << 2:
|
case 2 << 2:
|
||||||
LOG_INFO("main area read with more than 1 (incorrectable) error");
|
LOG_INFO("main area read with more than 1 (incorrectable) error");
|
||||||
return ERROR_NAND_OPERATION_FAILED;
|
return ERROR_NAND_OPERATION_FAILED;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
switch (ecc_status & 0x0003) {
|
switch (ecc_status & 0x0003) {
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -883,7 +882,6 @@ int ecc_status_v1(struct nand_device *nand)
|
||||||
case 2:
|
case 2:
|
||||||
LOG_INFO("main area read with more than 1 (incorrectable) error");
|
LOG_INFO("main area read with more than 1 (incorrectable) error");
|
||||||
return ERROR_NAND_OPERATION_FAILED;
|
return ERROR_NAND_OPERATION_FAILED;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
return ERROR_OK;
|
return ERROR_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -434,10 +434,8 @@ static int aducm360_write_block(struct flash_bank *bank,
|
||||||
switch (choice) {
|
switch (choice) {
|
||||||
case 0:
|
case 0:
|
||||||
return aducm360_write_block_sync(bank, buffer, offset, count);
|
return aducm360_write_block_sync(bank, buffer, offset, count);
|
||||||
break;
|
|
||||||
case 1:
|
case 1:
|
||||||
return aducm360_write_block_async(bank, buffer, offset, count);
|
return aducm360_write_block_async(bank, buffer, offset, count);
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
LOG_ERROR("aducm360_write_block was cancelled (no writing method was chosen)!");
|
LOG_ERROR("aducm360_write_block was cancelled (no writing method was chosen)!");
|
||||||
return ERROR_TARGET_RESOURCE_NOT_AVAILABLE;
|
return ERROR_TARGET_RESOURCE_NOT_AVAILABLE;
|
||||||
|
|
|
@ -3068,7 +3068,6 @@ FLASH_BANK_COMMAND_HANDLER(sam3_flash_bank_command)
|
||||||
((unsigned int)(FLASH_BANK1_BASE_256K_AX)),
|
((unsigned int)(FLASH_BANK1_BASE_256K_AX)),
|
||||||
((unsigned int)(FLASH_BANK1_BASE_512K_AX)));
|
((unsigned int)(FLASH_BANK1_BASE_512K_AX)));
|
||||||
return ERROR_FAIL;
|
return ERROR_FAIL;
|
||||||
break;
|
|
||||||
|
|
||||||
/* at91sam3s and at91sam3n series only has bank 0*/
|
/* at91sam3s and at91sam3n series only has bank 0*/
|
||||||
/* at91sam3u and at91sam3ax series has the same address for bank 0*/
|
/* at91sam3u and at91sam3ax series has the same address for bank 0*/
|
||||||
|
@ -3621,10 +3620,8 @@ COMMAND_HANDLER(sam3_handle_gpnvm_command)
|
||||||
switch (CMD_ARGC) {
|
switch (CMD_ARGC) {
|
||||||
default:
|
default:
|
||||||
return ERROR_COMMAND_SYNTAX_ERROR;
|
return ERROR_COMMAND_SYNTAX_ERROR;
|
||||||
break;
|
|
||||||
case 0:
|
case 0:
|
||||||
goto showall;
|
goto showall;
|
||||||
break;
|
|
||||||
case 1:
|
case 1:
|
||||||
who = -1;
|
who = -1;
|
||||||
break;
|
break;
|
||||||
|
@ -3708,7 +3705,6 @@ COMMAND_HANDLER(sam3_handle_slowclk_command)
|
||||||
/* error */
|
/* error */
|
||||||
command_print(CMD, "Too many parameters");
|
command_print(CMD, "Too many parameters");
|
||||||
return ERROR_COMMAND_SYNTAX_ERROR;
|
return ERROR_COMMAND_SYNTAX_ERROR;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
command_print(CMD, "Slowclk freq: %d.%03dkhz",
|
command_print(CMD, "Slowclk freq: %d.%03dkhz",
|
||||||
(int)(pChip->cfg.slow_freq / 1000),
|
(int)(pChip->cfg.slow_freq / 1000),
|
||||||
|
|
|
@ -2482,7 +2482,6 @@ FLASH_BANK_COMMAND_HANDLER(sam4_flash_bank_command)
|
||||||
((unsigned int)(bank->base)),
|
((unsigned int)(bank->base)),
|
||||||
((unsigned int)(FLASH_BANK_BASE_S)));
|
((unsigned int)(FLASH_BANK_BASE_S)));
|
||||||
return ERROR_FAIL;
|
return ERROR_FAIL;
|
||||||
break;
|
|
||||||
|
|
||||||
/* at91sam4s series only has bank 0*/
|
/* at91sam4s series only has bank 0*/
|
||||||
/* at91sam4sd series has the same address for bank 0 (FLASH_BANK0_BASE_SD)*/
|
/* at91sam4sd series has the same address for bank 0 (FLASH_BANK0_BASE_SD)*/
|
||||||
|
@ -3101,10 +3100,8 @@ COMMAND_HANDLER(sam4_handle_gpnvm_command)
|
||||||
switch (CMD_ARGC) {
|
switch (CMD_ARGC) {
|
||||||
default:
|
default:
|
||||||
return ERROR_COMMAND_SYNTAX_ERROR;
|
return ERROR_COMMAND_SYNTAX_ERROR;
|
||||||
break;
|
|
||||||
case 0:
|
case 0:
|
||||||
goto showall;
|
goto showall;
|
||||||
break;
|
|
||||||
case 1:
|
case 1:
|
||||||
who = -1;
|
who = -1;
|
||||||
break;
|
break;
|
||||||
|
@ -3188,7 +3185,6 @@ COMMAND_HANDLER(sam4_handle_slowclk_command)
|
||||||
/* error */
|
/* error */
|
||||||
command_print(CMD, "Too many parameters");
|
command_print(CMD, "Too many parameters");
|
||||||
return ERROR_COMMAND_SYNTAX_ERROR;
|
return ERROR_COMMAND_SYNTAX_ERROR;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
command_print(CMD, "Slowclk freq: %d.%03dkhz",
|
command_print(CMD, "Slowclk freq: %d.%03dkhz",
|
||||||
(int)(pChip->cfg.slow_freq / 1000),
|
(int)(pChip->cfg.slow_freq / 1000),
|
||||||
|
|
|
@ -375,7 +375,6 @@ static int samv_probe(struct flash_bank *bank)
|
||||||
default:
|
default:
|
||||||
LOG_ERROR("unrecognized flash size code: %d", nvm_size_code);
|
LOG_ERROR("unrecognized flash size code: %d", nvm_size_code);
|
||||||
return ERROR_FAIL;
|
return ERROR_FAIL;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct samv_flash_bank *samv_info = bank->driver_priv;
|
struct samv_flash_bank *samv_info = bank->driver_priv;
|
||||||
|
@ -645,7 +644,6 @@ COMMAND_HANDLER(samv_handle_gpnvm_command)
|
||||||
switch (CMD_ARGC) {
|
switch (CMD_ARGC) {
|
||||||
case 0:
|
case 0:
|
||||||
goto showall;
|
goto showall;
|
||||||
break;
|
|
||||||
case 1:
|
case 1:
|
||||||
who = -1;
|
who = -1;
|
||||||
break;
|
break;
|
||||||
|
@ -660,7 +658,6 @@ COMMAND_HANDLER(samv_handle_gpnvm_command)
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return ERROR_COMMAND_SYNTAX_ERROR;
|
return ERROR_COMMAND_SYNTAX_ERROR;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t v;
|
uint32_t v;
|
||||||
|
|
|
@ -989,10 +989,8 @@ int cfi_erase(struct flash_bank *bank, int first, int last)
|
||||||
case 1:
|
case 1:
|
||||||
case 3:
|
case 3:
|
||||||
return cfi_intel_erase(bank, first, last);
|
return cfi_intel_erase(bank, first, last);
|
||||||
break;
|
|
||||||
case 2:
|
case 2:
|
||||||
return cfi_spansion_erase(bank, first, last);
|
return cfi_spansion_erase(bank, first, last);
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
LOG_ERROR("cfi primary command set %i unsupported", cfi_info->pri_id);
|
LOG_ERROR("cfi primary command set %i unsupported", cfi_info->pri_id);
|
||||||
break;
|
break;
|
||||||
|
@ -1128,7 +1126,6 @@ int cfi_protect(struct flash_bank *bank, int set, int first, int last)
|
||||||
case 1:
|
case 1:
|
||||||
case 3:
|
case 3:
|
||||||
return cfi_intel_protect(bank, set, first, last);
|
return cfi_intel_protect(bank, set, first, last);
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
LOG_WARNING("protect: cfi primary command set %i unsupported", cfi_info->pri_id);
|
LOG_WARNING("protect: cfi primary command set %i unsupported", cfi_info->pri_id);
|
||||||
return ERROR_OK;
|
return ERROR_OK;
|
||||||
|
@ -1144,13 +1141,10 @@ static uint32_t cfi_command_val(struct flash_bank *bank, uint8_t cmd)
|
||||||
switch (bank->bus_width) {
|
switch (bank->bus_width) {
|
||||||
case 1:
|
case 1:
|
||||||
return buf[0];
|
return buf[0];
|
||||||
break;
|
|
||||||
case 2:
|
case 2:
|
||||||
return target_buffer_get_u16(target, buf);
|
return target_buffer_get_u16(target, buf);
|
||||||
break;
|
|
||||||
case 4:
|
case 4:
|
||||||
return target_buffer_get_u32(target, buf);
|
return target_buffer_get_u32(target, buf);
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
LOG_ERROR("Unsupported bank buswidth %d, can't do block memory writes",
|
LOG_ERROR("Unsupported bank buswidth %d, can't do block memory writes",
|
||||||
bank->bus_width);
|
bank->bus_width);
|
||||||
|
@ -2222,10 +2216,8 @@ int cfi_write_word(struct flash_bank *bank, uint8_t *word, uint32_t address)
|
||||||
case 1:
|
case 1:
|
||||||
case 3:
|
case 3:
|
||||||
return cfi_intel_write_word(bank, word, address);
|
return cfi_intel_write_word(bank, word, address);
|
||||||
break;
|
|
||||||
case 2:
|
case 2:
|
||||||
return cfi_spansion_write_word(bank, word, address);
|
return cfi_spansion_write_word(bank, word, address);
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
LOG_ERROR("cfi primary command set %i unsupported", cfi_info->pri_id);
|
LOG_ERROR("cfi primary command set %i unsupported", cfi_info->pri_id);
|
||||||
break;
|
break;
|
||||||
|
@ -2249,10 +2241,8 @@ static int cfi_write_words(struct flash_bank *bank, const uint8_t *word,
|
||||||
case 1:
|
case 1:
|
||||||
case 3:
|
case 3:
|
||||||
return cfi_intel_write_words(bank, word, wordcount, address);
|
return cfi_intel_write_words(bank, word, wordcount, address);
|
||||||
break;
|
|
||||||
case 2:
|
case 2:
|
||||||
return cfi_spansion_write_words(bank, word, wordcount, address);
|
return cfi_spansion_write_words(bank, word, wordcount, address);
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
LOG_ERROR("cfi primary command set %i unsupported", cfi_info->pri_id);
|
LOG_ERROR("cfi primary command set %i unsupported", cfi_info->pri_id);
|
||||||
break;
|
break;
|
||||||
|
@ -2998,10 +2988,8 @@ int cfi_protect_check(struct flash_bank *bank)
|
||||||
case 1:
|
case 1:
|
||||||
case 3:
|
case 3:
|
||||||
return cfi_intel_protect_check(bank);
|
return cfi_intel_protect_check(bank);
|
||||||
break;
|
|
||||||
case 2:
|
case 2:
|
||||||
return cfi_spansion_protect_check(bank);
|
return cfi_spansion_protect_check(bank);
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
LOG_ERROR("cfi primary command set %i unsupported", cfi_info->pri_id);
|
LOG_ERROR("cfi primary command set %i unsupported", cfi_info->pri_id);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -481,20 +481,15 @@ static const char *protection_to_str(uint8_t protection)
|
||||||
switch (protection) {
|
switch (protection) {
|
||||||
case PROTECTION_VIRGIN:
|
case PROTECTION_VIRGIN:
|
||||||
return "VIRGIN";
|
return "VIRGIN";
|
||||||
break;
|
|
||||||
case PROTECTION_NORMAL:
|
case PROTECTION_NORMAL:
|
||||||
return "NORMAL";
|
return "NORMAL";
|
||||||
break;
|
|
||||||
case PROTECTION_SECURE:
|
case PROTECTION_SECURE:
|
||||||
return "SECURE";
|
return "SECURE";
|
||||||
break;
|
|
||||||
case PROTECTION_DEAD:
|
case PROTECTION_DEAD:
|
||||||
return "DEAD";
|
return "DEAD";
|
||||||
break;
|
|
||||||
case PROTECTION_UNKNOWN:
|
case PROTECTION_UNKNOWN:
|
||||||
default:
|
default:
|
||||||
return "UNKNOWN";
|
return "UNKNOWN";
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -625,7 +625,6 @@ static int xcf_probe(struct flash_bank *bank)
|
||||||
default:
|
default:
|
||||||
LOG_ERROR("Unknown flash device ID 0x%X", id);
|
LOG_ERROR("Unknown flash device ID 0x%X", id);
|
||||||
return ERROR_FAIL;
|
return ERROR_FAIL;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bank->sectors = malloc(bank->num_sectors * sizeof(struct flash_sector));
|
bank->sectors = malloc(bank->num_sectors * sizeof(struct flash_sector));
|
||||||
|
|
|
@ -2677,7 +2677,6 @@ static int stlink_speed(void *handle, int khz, bool query)
|
||||||
switch (h->transport) {
|
switch (h->transport) {
|
||||||
case HL_TRANSPORT_SWIM:
|
case HL_TRANSPORT_SWIM:
|
||||||
return stlink_speed_swim(handle, khz, query);
|
return stlink_speed_swim(handle, khz, query);
|
||||||
break;
|
|
||||||
case HL_TRANSPORT_SWD:
|
case HL_TRANSPORT_SWD:
|
||||||
if (h->version.jtag_api == STLINK_JTAG_API_V3)
|
if (h->version.jtag_api == STLINK_JTAG_API_V3)
|
||||||
return stlink_speed_v3(handle, false, khz, query);
|
return stlink_speed_v3(handle, false, khz, query);
|
||||||
|
|
|
@ -765,58 +765,40 @@ static const char *ulink_cmd_id_string(uint8_t id)
|
||||||
switch (id) {
|
switch (id) {
|
||||||
case CMD_SCAN_IN:
|
case CMD_SCAN_IN:
|
||||||
return "CMD_SCAN_IN";
|
return "CMD_SCAN_IN";
|
||||||
break;
|
|
||||||
case CMD_SLOW_SCAN_IN:
|
case CMD_SLOW_SCAN_IN:
|
||||||
return "CMD_SLOW_SCAN_IN";
|
return "CMD_SLOW_SCAN_IN";
|
||||||
break;
|
|
||||||
case CMD_SCAN_OUT:
|
case CMD_SCAN_OUT:
|
||||||
return "CMD_SCAN_OUT";
|
return "CMD_SCAN_OUT";
|
||||||
break;
|
|
||||||
case CMD_SLOW_SCAN_OUT:
|
case CMD_SLOW_SCAN_OUT:
|
||||||
return "CMD_SLOW_SCAN_OUT";
|
return "CMD_SLOW_SCAN_OUT";
|
||||||
break;
|
|
||||||
case CMD_SCAN_IO:
|
case CMD_SCAN_IO:
|
||||||
return "CMD_SCAN_IO";
|
return "CMD_SCAN_IO";
|
||||||
break;
|
|
||||||
case CMD_SLOW_SCAN_IO:
|
case CMD_SLOW_SCAN_IO:
|
||||||
return "CMD_SLOW_SCAN_IO";
|
return "CMD_SLOW_SCAN_IO";
|
||||||
break;
|
|
||||||
case CMD_CLOCK_TMS:
|
case CMD_CLOCK_TMS:
|
||||||
return "CMD_CLOCK_TMS";
|
return "CMD_CLOCK_TMS";
|
||||||
break;
|
|
||||||
case CMD_SLOW_CLOCK_TMS:
|
case CMD_SLOW_CLOCK_TMS:
|
||||||
return "CMD_SLOW_CLOCK_TMS";
|
return "CMD_SLOW_CLOCK_TMS";
|
||||||
break;
|
|
||||||
case CMD_CLOCK_TCK:
|
case CMD_CLOCK_TCK:
|
||||||
return "CMD_CLOCK_TCK";
|
return "CMD_CLOCK_TCK";
|
||||||
break;
|
|
||||||
case CMD_SLOW_CLOCK_TCK:
|
case CMD_SLOW_CLOCK_TCK:
|
||||||
return "CMD_SLOW_CLOCK_TCK";
|
return "CMD_SLOW_CLOCK_TCK";
|
||||||
break;
|
|
||||||
case CMD_SLEEP_US:
|
case CMD_SLEEP_US:
|
||||||
return "CMD_SLEEP_US";
|
return "CMD_SLEEP_US";
|
||||||
break;
|
|
||||||
case CMD_SLEEP_MS:
|
case CMD_SLEEP_MS:
|
||||||
return "CMD_SLEEP_MS";
|
return "CMD_SLEEP_MS";
|
||||||
break;
|
|
||||||
case CMD_GET_SIGNALS:
|
case CMD_GET_SIGNALS:
|
||||||
return "CMD_GET_SIGNALS";
|
return "CMD_GET_SIGNALS";
|
||||||
break;
|
|
||||||
case CMD_SET_SIGNALS:
|
case CMD_SET_SIGNALS:
|
||||||
return "CMD_SET_SIGNALS";
|
return "CMD_SET_SIGNALS";
|
||||||
break;
|
|
||||||
case CMD_CONFIGURE_TCK_FREQ:
|
case CMD_CONFIGURE_TCK_FREQ:
|
||||||
return "CMD_CONFIGURE_TCK_FREQ";
|
return "CMD_CONFIGURE_TCK_FREQ";
|
||||||
break;
|
|
||||||
case CMD_SET_LEDS:
|
case CMD_SET_LEDS:
|
||||||
return "CMD_SET_LEDS";
|
return "CMD_SET_LEDS";
|
||||||
break;
|
|
||||||
case CMD_TEST:
|
case CMD_TEST:
|
||||||
return "CMD_TEST";
|
return "CMD_TEST";
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
return "CMD_UNKNOWN";
|
return "CMD_UNKNOWN";
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1310,7 +1310,6 @@ XXR_common:
|
||||||
case PIOMAP:
|
case PIOMAP:
|
||||||
LOG_ERROR("PIO and PIOMAP are not supported");
|
LOG_ERROR("PIO and PIOMAP are not supported");
|
||||||
return ERROR_FAIL;
|
return ERROR_FAIL;
|
||||||
break;
|
|
||||||
case RUNTEST:
|
case RUNTEST:
|
||||||
/* RUNTEST [run_state] run_count run_clk [min_time SEC [MAXIMUM max_time
|
/* RUNTEST [run_state] run_count run_clk [min_time SEC [MAXIMUM max_time
|
||||||
* SEC]] [ENDSTATE end_state] */
|
* SEC]] [ENDSTATE end_state] */
|
||||||
|
@ -1532,7 +1531,6 @@ XXR_common:
|
||||||
default:
|
default:
|
||||||
LOG_ERROR("invalid svf command: %s", argus[0]);
|
LOG_ERROR("invalid svf command: %s", argus[0]);
|
||||||
return ERROR_FAIL;
|
return ERROR_FAIL;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!svf_quiet) {
|
if (!svf_quiet) {
|
||||||
|
|
|
@ -2309,7 +2309,6 @@ static int evaluate_data_proc_thumb(uint16_t opcode,
|
||||||
address, opcode);
|
address, opcode);
|
||||||
}
|
}
|
||||||
return ERROR_OK;
|
return ERROR_OK;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
switch (op) {
|
switch (op) {
|
||||||
|
|
|
@ -212,7 +212,6 @@ int arm_dpm_read_reg(struct arm_dpm *dpm, struct reg *r, unsigned regnum)
|
||||||
break;
|
break;
|
||||||
case ARM_VFP_V3_D0 ... ARM_VFP_V3_D31:
|
case ARM_VFP_V3_D0 ... ARM_VFP_V3_D31:
|
||||||
return dpm_read_reg_u64(dpm, r, regnum);
|
return dpm_read_reg_u64(dpm, r, regnum);
|
||||||
break;
|
|
||||||
case ARM_VFP_V3_FPSCR:
|
case ARM_VFP_V3_FPSCR:
|
||||||
/* "VMRS r0, FPSCR"; then return via DCC */
|
/* "VMRS r0, FPSCR"; then return via DCC */
|
||||||
retval = dpm->instr_read_data_r0(dpm,
|
retval = dpm->instr_read_data_r0(dpm,
|
||||||
|
@ -294,7 +293,6 @@ static int dpm_write_reg(struct arm_dpm *dpm, struct reg *r, unsigned regnum)
|
||||||
break;
|
break;
|
||||||
case ARM_VFP_V3_D0 ... ARM_VFP_V3_D31:
|
case ARM_VFP_V3_D0 ... ARM_VFP_V3_D31:
|
||||||
return dpm_write_reg_u64(dpm, r, regnum);
|
return dpm_write_reg_u64(dpm, r, regnum);
|
||||||
break;
|
|
||||||
case ARM_VFP_V3_FPSCR:
|
case ARM_VFP_V3_FPSCR:
|
||||||
/* move to r0 from DCC, then "VMSR FPSCR, r0" */
|
/* move to r0 from DCC, then "VMSR FPSCR, r0" */
|
||||||
retval = dpm->instr_write_data_r0(dpm,
|
retval = dpm->instr_write_data_r0(dpm,
|
||||||
|
|
|
@ -1223,7 +1223,6 @@ int arm_get_gdb_reg_list(struct target *target,
|
||||||
(*reg_list)[25] = arm->cpsr;
|
(*reg_list)[25] = arm->cpsr;
|
||||||
|
|
||||||
return ERROR_OK;
|
return ERROR_OK;
|
||||||
break;
|
|
||||||
|
|
||||||
case REG_CLASS_ALL:
|
case REG_CLASS_ALL:
|
||||||
switch (arm->core_type) {
|
switch (arm->core_type) {
|
||||||
|
@ -1273,12 +1272,10 @@ int arm_get_gdb_reg_list(struct target *target,
|
||||||
}
|
}
|
||||||
|
|
||||||
return ERROR_OK;
|
return ERROR_OK;
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
LOG_ERROR("not a valid register class type in query.");
|
LOG_ERROR("not a valid register class type in query.");
|
||||||
return ERROR_FAIL;
|
return ERROR_FAIL;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -464,7 +464,6 @@ static int avr32_ap7k_read_memory(struct target *target, target_addr_t address,
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
return avr32_jtag_read_memory8(&ap7k->jtag, address, count, buffer);
|
return avr32_jtag_read_memory8(&ap7k->jtag, address, count, buffer);
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -505,7 +504,6 @@ static int avr32_ap7k_write_memory(struct target *target, target_addr_t address,
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
return avr32_jtag_write_memory8(&ap7k->jtag, address, count, buffer);
|
return avr32_jtag_write_memory8(&ap7k->jtag, address, count, buffer);
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -666,10 +666,8 @@ uint32_t abstract_register_size(unsigned width)
|
||||||
return set_field(0, AC_ACCESS_REGISTER_SIZE, 2);
|
return set_field(0, AC_ACCESS_REGISTER_SIZE, 2);
|
||||||
case 64:
|
case 64:
|
||||||
return set_field(0, AC_ACCESS_REGISTER_SIZE, 3);
|
return set_field(0, AC_ACCESS_REGISTER_SIZE, 3);
|
||||||
break;
|
|
||||||
case 128:
|
case 128:
|
||||||
return set_field(0, AC_ACCESS_REGISTER_SIZE, 4);
|
return set_field(0, AC_ACCESS_REGISTER_SIZE, 4);
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
LOG_ERROR("Unsupported register width: %d", width);
|
LOG_ERROR("Unsupported register width: %d", width);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -290,7 +290,6 @@ static int jim_transport_select(Jim_Interp *interp, int argc, Jim_Obj * const *a
|
||||||
}
|
}
|
||||||
Jim_SetResultString(interp, session->name, -1);
|
Jim_SetResultString(interp, session->name, -1);
|
||||||
return JIM_OK;
|
return JIM_OK;
|
||||||
break;
|
|
||||||
case 2: /* assign */
|
case 2: /* assign */
|
||||||
if (session) {
|
if (session) {
|
||||||
if (!strcmp(session->name, argv[1]->bytes)) {
|
if (!strcmp(session->name, argv[1]->bytes)) {
|
||||||
|
@ -327,7 +326,6 @@ static int jim_transport_select(Jim_Interp *interp, int argc, Jim_Obj * const *a
|
||||||
|
|
||||||
LOG_ERROR("Debug adapter doesn't support '%s' transport", argv[1]->bytes);
|
LOG_ERROR("Debug adapter doesn't support '%s' transport", argv[1]->bytes);
|
||||||
return JIM_ERR;
|
return JIM_ERR;
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
Jim_WrongNumArgs(interp, 1, argv, "[too many parameters]");
|
Jim_WrongNumArgs(interp, 1, argv, "[too many parameters]");
|
||||||
return JIM_ERR;
|
return JIM_ERR;
|
||||||
|
|
Loading…
Reference in New Issue