target: fix minor typos and duplicated words
[openocd.git] / src / target / riscv / riscv-013.c
index 66218b76ead8cc50c9cc5b892f956517e4b0cf9a..2f8da5b36d9cdf4af317500c93bccb00c4742de1 100644 (file)
@@ -666,10 +666,8 @@ uint32_t abstract_register_size(unsigned width)
                        return set_field(0, AC_ACCESS_REGISTER_SIZE, 2);
                case 64:
                        return set_field(0, AC_ACCESS_REGISTER_SIZE, 3);
-                       break;
                case 128:
                        return set_field(0, AC_ACCESS_REGISTER_SIZE, 4);
-                       break;
                default:
                        LOG_ERROR("Unsupported register width: %d", width);
                        return 0;
@@ -1892,11 +1890,9 @@ static target_addr_t sb_read_address(struct target *target)
        target_addr_t address = 0;
        uint32_t v;
        if (sbasize > 32) {
-#if BUILD_TARGET64
                dmi_read(target, &v, DMI_SBADDRESS1);
                address |= v;
                address <<= 32;
-#endif
        }
        dmi_read(target, &v, DMI_SBADDRESS0);
        address |= v;
@@ -1913,11 +1909,7 @@ static int sb_write_address(struct target *target, target_addr_t address)
        if (sbasize > 64)
                dmi_write(target, DMI_SBADDRESS2, 0);
        if (sbasize > 32)
-#if BUILD_TARGET64
                dmi_write(target, DMI_SBADDRESS1, address >> 32);
-#else
-               dmi_write(target, DMI_SBADDRESS1, 0);
-#endif
        return dmi_write(target, DMI_SBADDRESS0, address);
 }
 
@@ -3720,13 +3712,13 @@ int riscv013_test_compliance(struct target *target)
        But at any rate, this is not legal and should cause an error. */
        COMPLIANCE_WRITE(target, DMI_COMMAND, 0xAAAAAAAA);
        COMPLIANCE_READ(target, &testvar_read, DMI_ABSTRACTCS);
-       COMPLIANCE_TEST(get_field(testvar_read, DMI_ABSTRACTCS_CMDERR) == CMDERR_NOT_SUPPORTED, \
+       COMPLIANCE_TEST(get_field(testvar_read, DMI_ABSTRACTCS_CMDERR) == CMDERR_NOT_SUPPORTED,
                        "Illegal COMMAND should result in UNSUPPORTED");
        COMPLIANCE_WRITE(target, DMI_ABSTRACTCS, DMI_ABSTRACTCS_CMDERR);
 
        COMPLIANCE_WRITE(target, DMI_COMMAND, 0x55555555);
        COMPLIANCE_READ(target, &testvar_read, DMI_ABSTRACTCS);
-       COMPLIANCE_TEST(get_field(testvar_read, DMI_ABSTRACTCS_CMDERR) == CMDERR_NOT_SUPPORTED, \
+       COMPLIANCE_TEST(get_field(testvar_read, DMI_ABSTRACTCS_CMDERR) == CMDERR_NOT_SUPPORTED,
                        "Illegal COMMAND should result in UNSUPPORTED");
        COMPLIANCE_WRITE(target, DMI_ABSTRACTCS, DMI_ABSTRACTCS_CMDERR);
 
@@ -3740,10 +3732,10 @@ int riscv013_test_compliance(struct target *target)
                COMPLIANCE_TEST(ERROR_OK == register_read_direct(target, &testval_read, GDB_REGNO_ZERO + i),
                                "GPR Reads should be supported.");
                if (riscv_xlen(target) > 32) {
-                       /* Dummy comment to satisfy linter, since removing the brances here doesn't actually compile. */
+                       /* Dummy comment to satisfy linter, since removing the branches here doesn't actually compile. */
                        COMPLIANCE_TEST(testval == testval_read, "GPR Reads and writes should be supported.");
                } else {
-                       /* Dummy comment to satisfy linter, since removing the brances here doesn't actually compile. */
+                       /* Dummy comment to satisfy linter, since removing the branches here doesn't actually compile. */
                        COMPLIANCE_TEST((testval & 0xFFFFFFFF) == testval_read, "GPR Reads and writes should be supported.");
                }
        }

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)