From: Zachary T Welch Date: Fri, 13 Nov 2009 16:41:46 +0000 (-0800) Subject: armv7m_core_reg_t -> struct armv7m_core_reg X-Git-Tag: v0.4.0-rc1~675 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=94f5ed90f1832e81803713f4364de586a69247d4;p=openocd armv7m_core_reg_t -> struct armv7m_core_reg Remove misleading typedef and redundant suffix from struct armv7m_core_reg. --- diff --git a/src/target/armv7m.c b/src/target/armv7m.c index 3ce6d7a8..9319bf25 100644 --- a/src/target/armv7m.c +++ b/src/target/armv7m.c @@ -181,7 +181,7 @@ char *armv7m_exception_string(int number) static int armv7m_get_core_reg(reg_t *reg) { int retval; - armv7m_core_reg_t *armv7m_reg = reg->arch_info; + struct armv7m_core_reg *armv7m_reg = reg->arch_info; target_t *target = armv7m_reg->target; struct armv7m_common *armv7m = target_to_armv7m(target); @@ -197,7 +197,7 @@ static int armv7m_get_core_reg(reg_t *reg) static int armv7m_set_core_reg(reg_t *reg, uint8_t *buf) { - armv7m_core_reg_t *armv7m_reg = reg->arch_info; + struct armv7m_core_reg *armv7m_reg = reg->arch_info; target_t *target = armv7m_reg->target; uint32_t value = buf_get_u32(buf, 0, 32); @@ -217,7 +217,7 @@ static int armv7m_read_core_reg(struct target_s *target, int num) { uint32_t reg_value; int retval; - armv7m_core_reg_t * armv7m_core_reg; + struct armv7m_core_reg * armv7m_core_reg; struct armv7m_common *armv7m = target_to_armv7m(target); if ((num < 0) || (num >= ARMV7M_NUM_REGS)) @@ -236,7 +236,7 @@ static int armv7m_write_core_reg(struct target_s *target, int num) { int retval; uint32_t reg_value; - armv7m_core_reg_t *armv7m_core_reg; + struct armv7m_core_reg *armv7m_core_reg; struct armv7m_common *armv7m = target_to_armv7m(target); if ((num < 0) || (num >= ARMV7M_NUM_REGS)) @@ -531,7 +531,7 @@ reg_cache_t *armv7m_build_reg_cache(target_t *target) reg_cache_t **cache_p = register_get_last_cache_p(&target->reg_cache); reg_cache_t *cache = malloc(sizeof(reg_cache_t)); reg_t *reg_list = calloc(num_regs, sizeof(reg_t)); - armv7m_core_reg_t *arch_info = calloc(num_regs, sizeof(armv7m_core_reg_t)); + struct armv7m_core_reg *arch_info = calloc(num_regs, sizeof(struct armv7m_core_reg)); int i; if (armv7m_core_reg_arch_type == -1) diff --git a/src/target/armv7m.h b/src/target/armv7m.h index 6e857ee4..43ec5632 100644 --- a/src/target/armv7m.h +++ b/src/target/armv7m.h @@ -126,13 +126,13 @@ struct armv7m_algorithm enum armv7m_mode core_mode; }; -typedef struct armv7m_core_reg_s +struct armv7m_core_reg { uint32_t num; enum armv7m_regtype type; target_t *target; struct armv7m_common *armv7m_common; -} armv7m_core_reg_t; +}; reg_cache_t *armv7m_build_reg_cache(target_t *target); enum armv7m_mode armv7m_number_to_mode(int number);