cortex_m: Restore fast register reads if no polling is needed
[openocd.git] / src / target / esirisc.c
index d17e1ddff66a0649a475261810a439961a586911..e49f5f6596fc3ea0a36d9b95d599cc2b5d8fdd78 100644 (file)
@@ -472,7 +472,7 @@ static int esirisc_next_breakpoint(struct target *target)
        LOG_DEBUG("-");
 
        for (int bp_index = 0; breakpoints_p < breakpoints_e; ++breakpoints_p, ++bp_index)
-               if (*breakpoints_p == NULL)
+               if (!*breakpoints_p)
                        return bp_index;
 
        return -1;
@@ -608,7 +608,7 @@ static int esirisc_next_watchpoint(struct target *target)
        LOG_DEBUG("-");
 
        for (int wp_index = 0; watchpoints_p < watchpoints_e; ++watchpoints_p, ++wp_index)
-               if (*watchpoints_p == NULL)
+               if (!*watchpoints_p)
                        return wp_index;
 
        return -1;
@@ -1267,7 +1267,7 @@ static const char *esirisc_get_gdb_arch(struct target *target)
         * requires additional configuration to properly interact with these
         * targets in GDB (also see: `esirisc cache_arch`).
         */
-       if (esirisc->gdb_arch == NULL && target_was_examined(target))
+       if (!esirisc->gdb_arch && target_was_examined(target))
                esirisc->gdb_arch = alloc_printf("esirisc:%d_bit_%d_reg_%s",
                                esirisc->num_bits, esirisc->num_regs, esirisc_cache_arch_name(esirisc));
 
@@ -1284,7 +1284,7 @@ static int esirisc_get_gdb_reg_list(struct target *target, struct reg **reg_list
        *reg_list_size = ESIRISC_NUM_REGS;
 
        *reg_list = calloc(*reg_list_size, sizeof(struct reg *));
-       if (*reg_list == NULL)
+       if (!*reg_list)
                return ERROR_FAIL;
 
        if (reg_class == REG_CLASS_ALL)

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)