qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 5/5] hw/intc/arm_gicv3: Provide ich_num_aprs()


From: Richard Henderson
Subject: Re: [PATCH 5/5] hw/intc/arm_gicv3: Provide ich_num_aprs()
Date: Sat, 7 May 2022 06:36:21 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0

On 5/6/22 11:21, Peter Maydell wrote:
@@ -145,11 +153,8 @@ static int ich_highest_active_virt_prio(GICv3CPUState *cs)
       * in the ICH Active Priority Registers.
       */
      int i;
-    int aprmax = 1 << (cs->vprebits - 5);
- assert(aprmax <= ARRAY_SIZE(cs->ich_apr[0]));
-
-    for (i = 0; i < aprmax; i++) {
+    for (i = 0; i < ich_num_aprs(cs); i++) {

Better to retain the local variable for the loop bound.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]