From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44310) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPQCB-0003fp-Jp for qemu-devel@nongnu.org; Thu, 04 Sep 2014 02:07:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XPQBy-0004IF-MG for qemu-devel@nongnu.org; Thu, 04 Sep 2014 02:06:59 -0400 Received: from e28smtp09.in.ibm.com ([122.248.162.9]:35263) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPQBx-0004Gp-MM for qemu-devel@nongnu.org; Thu, 04 Sep 2014 02:06:46 -0400 Received: from /spool/local by e28smtp09.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 4 Sep 2014 11:36:42 +0530 Received: from d28relay05.in.ibm.com (d28relay05.in.ibm.com [9.184.220.62]) by d28dlp03.in.ibm.com (Postfix) with ESMTP id 1D9E6125808E for ; Thu, 4 Sep 2014 11:36:58 +0530 (IST) Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay05.in.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id s8466xFd1835500 for ; Thu, 4 Sep 2014 11:37:00 +0530 Received: from d28av01.in.ibm.com (localhost [127.0.0.1]) by d28av01.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s8466Wse017585 for ; Thu, 4 Sep 2014 11:36:32 +0530 From: Bharata B Rao Date: Thu, 4 Sep 2014 11:36:16 +0530 Message-Id: <1409810785-12391-7-git-send-email-bharata@linux.vnet.ibm.com> In-Reply-To: <1409810785-12391-1-git-send-email-bharata@linux.vnet.ibm.com> References: <1409810785-12391-1-git-send-email-bharata@linux.vnet.ibm.com> Subject: [Qemu-devel] [RFC PATCH v0 06/15] ppc: stop after getting first unused DR slot in DRC table List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: mdroth@linux.vnet.ibm.com, Bharata B Rao 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 --- 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