etm_reg_t -> struct etm_reg
authorZachary T Welch <zw@superlucidity.net>
Fri, 13 Nov 2009 16:42:32 +0000 (08:42 -0800)
committerZachary T Welch <zw@superlucidity.net>
Fri, 13 Nov 2009 19:58:11 +0000 (11:58 -0800)
Remove misleading typedef and redundant suffix from struct etm_reg.

src/target/etm.c
src/target/etm.h

index 864346326e46ad1b96c858fb7cca9200742134e3..ed2c76cfc35a445a94dbdd887d09b694a383020a 100644 (file)
@@ -235,7 +235,7 @@ static reg_t *etm_reg_lookup(etm_context_t *etm_ctx, unsigned id)
        int i;
 
        for (i = 0; i < cache->num_regs; i++) {
-               struct etm_reg_s *reg = cache->reg_list[i].arch_info;
+               struct etm_reg *reg = cache->reg_list[i].arch_info;
 
                if (reg->reg_info->addr == id)
                        return &cache->reg_list[i];
@@ -248,7 +248,7 @@ static reg_t *etm_reg_lookup(etm_context_t *etm_ctx, unsigned id)
 }
 
 static void etm_reg_add(unsigned bcd_vers, struct arm_jtag *jtag_info,
-               reg_cache_t *cache, etm_reg_t *ereg,
+               reg_cache_t *cache, struct etm_reg *ereg,
                const struct etm_reg_info *r, unsigned nreg)
 {
        reg_t *reg = cache->reg_list;
@@ -284,7 +284,7 @@ reg_cache_t *etm_build_reg_cache(target_t *target,
 {
        reg_cache_t *reg_cache = malloc(sizeof(reg_cache_t));
        reg_t *reg_list = NULL;
-       etm_reg_t *arch_info = NULL;
+       struct etm_reg *arch_info = NULL;
        unsigned bcd_vers, config;
 
        /* register a register arch-type for etm registers only once */
@@ -294,7 +294,7 @@ reg_cache_t *etm_build_reg_cache(target_t *target,
 
        /* the actual registers are kept in two arrays */
        reg_list = calloc(128, sizeof(reg_t));
-       arch_info = calloc(128, sizeof(etm_reg_t));
+       arch_info = calloc(128, sizeof(struct etm_reg));
 
        /* fill in values for the reg cache */
        reg_cache->name = "etm registers";
@@ -489,7 +489,7 @@ static int etm_get_reg(reg_t *reg)
 static int etm_read_reg_w_check(reg_t *reg,
                uint8_t* check_value, uint8_t* check_mask)
 {
-       etm_reg_t *etm_reg = reg->arch_info;
+       struct etm_reg *etm_reg = reg->arch_info;
        const struct etm_reg_info *r = etm_reg->reg_info;
        uint8_t reg_addr = r->addr & 0x7f;
        struct scan_field fields[3];
@@ -575,7 +575,7 @@ static int etm_set_reg_w_exec(reg_t *reg, uint8_t *buf)
 
 static int etm_write_reg(reg_t *reg, uint32_t value)
 {
-       etm_reg_t *etm_reg = reg->arch_info;
+       struct etm_reg *etm_reg = reg->arch_info;
        const struct etm_reg_info *r = etm_reg->reg_info;
        uint8_t reg_addr = r->addr & 0x7f;
        struct scan_field fields[3];
index d6e12103df12189ad4e3b2eb17b1624292ce1456..a58adb30a230e65947cc17f3ab5de63961f474ff 100644 (file)
@@ -71,12 +71,12 @@ enum
        ETM_ID = 0x79,
 };
 
-typedef struct etm_reg_s
+struct etm_reg
 {
        uint32_t value;
        const struct etm_reg_info *reg_info;
        struct arm_jtag *jtag_info;
-} etm_reg_t;
+};
 
 typedef enum
 {