Skip to contentSkip to conversation

target/riscv: Drop stray '+' in pmp()

PATCH In review TANG Tiancheng 3 participants 3 messages Jan 7 RISC-V

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target/riscv: Drop stray '+' in pmp()

Remove an unintended leading '+' left in target/riscv/csr.c (pmp()).

Fixes cd633bea8b0

---
This patch fixes a stray '+' character that was accidentally introduced in the PMP (Physical Memory Protection) CSR handling code in target/riscv/csr.c.

The issue was introduced in commit cd633bea8b0 as part of the PMP region count configurable feature and causes a syntax error that prevents compilation.

---
 target/riscv/csr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target/riscv/csr.c +1 -1
index 5c91658c3dc412c6f0e6db89120b935b4c0ea6cf..8c1312ab129f4fe6a21d4dff67b3a7d9ca175415 100644
@@ -743,7 +743,7 @@ static RISCVException pmp(CPURISCVState *env, int csrno)
 {
     if (riscv_cpu_cfg(env)->pmp) {
         int max_pmpcfg = (env->priv_ver >= PRIV_VERSION_1_12_0) ?
-+                              CSR_PMPCFG15 : CSR_PMPCFG3;
+                               CSR_PMPCFG15 : CSR_PMPCFG3;
 
         if (csrno <= max_pmpcfg) {
             uint32_t reg_index = csrno - CSR_PMPCFG0;

---
base-commit: 0fc482b73d8e085d1375b4e17b0647fd2e6fe8f0
change-id: 20251225-stray-d48679fda4a0

Best regards,

Signature · 1 line
TANG Tiancheng <[email protected]>
Reviewed-by on v1 1/1
#1 lore raw
Quoted 12 lines · TANG Tiancheng

Remove an unintended leading '+' left in target/riscv/csr.c (pmp()).

Fixes cd633bea8b0

---
This patch fixes a stray '+' character that was accidentally introduced in the PMP (Physical Memory Protection) CSR handling code in target/riscv/csr.c.

The issue was introduced in commit cd633bea8b0 as part of the PMP region count configurable feature and causes a syntax error that prevents compilation.

Quoted 5 lines
---
  target/riscv/csr.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by on v1 1/1
#2 lore raw
In reply to TANG Tiancheng
Quoted 8 lines · TANG Tiancheng

Remove an unintended leading '+' left in target/riscv/csr.c (pmp()).

Fixes cd633bea8b0

---
This patch fixes a stray '+' character that was accidentally introduced in the PMP (Physical Memory Protection) CSR handling code in target/riscv/csr.c.

Quoted 7 lines

The issue was introduced in commit cd633bea8b0 as part of the PMP region count configurable feature and causes a syntax error that prevents compilation.

---

Quoted 22 lines
  target/riscv/csr.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
target/riscv/csr.c +1 -2
index 5c91658c3dc412c6f0e6db89120b935b4c0ea6cf..8c1312ab129f4fe6a21d4dff67b3a7d9ca175415 100644
@@ -743,7 +743,7 @@ static RISCVException pmp(CPURISCVState *env, int csrno)
  {
      if (riscv_cpu_cfg(env)->pmp) {
          int max_pmpcfg = (env->priv_ver >= PRIV_VERSION_1_12_0) ?
-+                              CSR_PMPCFG15 : CSR_PMPCFG3;
+                               CSR_PMPCFG15 : CSR_PMPCFG3;
 
          if (csrno <= max_pmpcfg) {
              uint32_t reg_index = csrno - CSR_PMPCFG0;
 
---

base-commit: 0fc482b73d8e085d1375b4e17b0647fd2e6fe8f0
change-id: 20251225-stray-d48679fda4a0

Best regards,