]> git.sur5r.net Git - openocd/blobdiff - src/target/arm_dpm.c
cortex a8: add missing error handling
[openocd] / src / target / arm_dpm.c
index 8e8cc17aebda5bbad5e1616fee89b32ba364a059..4fbe5e3b07f314c20c4e9d13d2cb9e65391d5a54 100644 (file)
@@ -718,7 +718,7 @@ static int dpm_bpwp_setup(struct arm_dpm *dpm, struct dpm_bpwp *xp,
        xp->control = control;
        xp->dirty = true;
 
-       LOG_DEBUG("BPWP: addr %8.8x, control %x, number %d",
+       LOG_DEBUG("BPWP: addr %8.8" PRIx32 ", control %" PRIx32 ", number %d",
                        xp->address, control, xp->number);
 
        /* hardware is updated in write_dirty_registers() */
@@ -773,11 +773,11 @@ static int dpm_remove_breakpoint(struct target *target, struct breakpoint *bp)
        return retval;
 }
 
-static int dpm_watchpoint_setup(struct arm_dpm *dpm, unsigned index,
+static int dpm_watchpoint_setup(struct arm_dpm *dpm, unsigned index_t,
                struct watchpoint *wp)
 {
        int retval;
-       struct dpm_wp *dwp = dpm->dwp + index;
+       struct dpm_wp *dwp = dpm->dwp + index_t;
        uint32_t control;
 
        /* this hardware doesn't support data value matching or masking */
@@ -804,7 +804,7 @@ static int dpm_watchpoint_setup(struct arm_dpm *dpm, unsigned index,
        }
        dwp->bpwp.control = control;
 
-       dpm->dwp[index].wp = wp;
+       dpm->dwp[index_t].wp = wp;
 
        return retval;
 }