target/cortex_m: make a variable local
The vec_ids variable is not referenced anywhere other than the vector catch command handler. Make it local to that function. Change-Id: Ie5865e8f78698c19a09f0b9d58269ced1c9db440 Signed-off-by: Christopher Head <chead@zaber.com> Reviewed-on: http://openocd.zylin.com/4606 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
This commit is contained in:
parent
1e374d508b
commit
11e3b6fb09
|
@ -2274,6 +2274,14 @@ static int cortex_m_verify_pointer(struct command_context *cmd_ctx,
|
||||||
* cortexm3_target structure, which is only used with CM3 targets.
|
* cortexm3_target structure, which is only used with CM3 targets.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
COMMAND_HANDLER(handle_cortex_m_vector_catch_command)
|
||||||
|
{
|
||||||
|
struct target *target = get_current_target(CMD_CTX);
|
||||||
|
struct cortex_m_common *cortex_m = target_to_cm(target);
|
||||||
|
struct armv7m_common *armv7m = &cortex_m->armv7m;
|
||||||
|
uint32_t demcr = 0;
|
||||||
|
int retval;
|
||||||
|
|
||||||
static const struct {
|
static const struct {
|
||||||
char name[10];
|
char name[10];
|
||||||
unsigned mask;
|
unsigned mask;
|
||||||
|
@ -2288,14 +2296,6 @@ static const struct {
|
||||||
{ "reset", VC_CORERESET, },
|
{ "reset", VC_CORERESET, },
|
||||||
};
|
};
|
||||||
|
|
||||||
COMMAND_HANDLER(handle_cortex_m_vector_catch_command)
|
|
||||||
{
|
|
||||||
struct target *target = get_current_target(CMD_CTX);
|
|
||||||
struct cortex_m_common *cortex_m = target_to_cm(target);
|
|
||||||
struct armv7m_common *armv7m = &cortex_m->armv7m;
|
|
||||||
uint32_t demcr = 0;
|
|
||||||
int retval;
|
|
||||||
|
|
||||||
retval = cortex_m_verify_pointer(CMD_CTX, cortex_m);
|
retval = cortex_m_verify_pointer(CMD_CTX, cortex_m);
|
||||||
if (retval != ERROR_OK)
|
if (retval != ERROR_OK)
|
||||||
return retval;
|
return retval;
|
||||||
|
|
Loading…
Reference in New Issue