qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [RFC PATCH v0 06/15] ppc: stop after getting first unused D


From: Bharata B Rao
Subject: [Qemu-devel] [RFC PATCH v0 06/15] ppc: stop after getting first unused DR slot in DRC table
Date: Thu, 4 Sep 2014 11:36:16 +0530

When adding a new entry to the DRC table, stop looking at more entries
after finding the first free slot.

Signed-off-by: Bharata B Rao <address@hidden>
---
 hw/ppc/spapr.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 441a4a7..6a0b9c5 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -372,6 +372,7 @@ static sPAPRDrcEntry *spapr_add_to_drc_table(int type, 
uint64_t buid,
     for (i = start; i < end; i++) {
         if (spapr->drc_table[i].id == 0) {
             empty_drc = &spapr->drc_table[i];
+            break;
         }
 
         if (spapr->drc_table[i].id == buid) {
-- 
1.7.11.7




reply via email to

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