Skip to contentSkip to conversation

xen/arm: gic-v3: Add missing breaks gicv3_read_apr()

PATCH In review Julien Grall 2 participants 2 messages May 12, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen/arm: gic-v3: Add missing breaks gicv3_read_apr()

From: Julien Grall <[email protected]>

Commit 78e67c99eb3f "arm/gic: Get rid of READ/WRITE_SYSREG32" mistakenly converted all the cases in gicv3_read_apr() to fall-through.

Rather than re-instating a return per case, add the missing break and keep a single return at the end of the fucntion.

Fixes 78e67c99eb3f ("arm/gic: Get rid of READ/WRITE_SYSREG32")
---
 xen/arch/arm/gic-v3.c | 3 +++
 1 file changed, 3 insertions(+)
xen/arch/arm/gic-v3.c +3 -0
index b86f04058947..9a3a175ad7d2 100644
@@ -1167,12 +1167,15 @@ static unsigned int gicv3_read_apr(int apr_reg)
     case 0:
         ASSERT(gicv3.nr_priorities > 4 && gicv3.nr_priorities < 8);
         apr = READ_SYSREG(ICH_AP1R0_EL2);
+        break;
     case 1:
         ASSERT(gicv3.nr_priorities > 5 && gicv3.nr_priorities < 8);
         apr = READ_SYSREG(ICH_AP1R1_EL2);
+        break;
     case 2:
         ASSERT(gicv3.nr_priorities > 6 && gicv3.nr_priorities < 8);
         apr = READ_SYSREG(ICH_AP1R2_EL2);
+        break;
     default:
         BUG();
     }
Signature · 1 line
2.17.1
#1 lore raw
Quoted 10 lines · Julien Grall

From: Julien Grall <[email protected]>

Commit 78e67c99eb3f "arm/gic: Get rid of READ/WRITE_SYSREG32" mistakenly converted all the cases in gicv3_read_apr() to fall-through.

Rather than re-instating a return per case, add the missing break and keep a single return at the end of the fucntion.

Fixes 78e67c99eb3f ("arm/gic: Get rid of READ/WRITE_SYSREG32")

reviewed and committed

Quoted 27 lines
---
 xen/arch/arm/gic-v3.c | 3 +++
 1 file changed, 3 insertions(+)
xen/arch/arm/gic-v3.c +3 -0
index b86f04058947..9a3a175ad7d2 100644
@@ -1167,12 +1167,15 @@ static unsigned int gicv3_read_apr(int apr_reg)
     case 0:
         ASSERT(gicv3.nr_priorities > 4 && gicv3.nr_priorities < 8);
         apr = READ_SYSREG(ICH_AP1R0_EL2);
+        break;
     case 1:
         ASSERT(gicv3.nr_priorities > 5 && gicv3.nr_priorities < 8);
         apr = READ_SYSREG(ICH_AP1R1_EL2);
+        break;
     case 2:
         ASSERT(gicv3.nr_priorities > 6 && gicv3.nr_priorities < 8);
         apr = READ_SYSREG(ICH_AP1R2_EL2);
+        break;
     default:
         BUG();
     }
Signature · 1 line
2.17.1