From patchwork Tue Jun 2 16:33:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 49431 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 31A6D20BD1 for ; Tue, 2 Jun 2015 16:47:07 +0000 (UTC) Received: by lani11 with SMTP id i11sf46936197lan.3 for ; Tue, 02 Jun 2015 09:47:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=Syvx8yXW97HySyptAIIGWD8FvObTwYZl5dGjFdqx+PA=; b=j/vqKASQRHyz2wxyL0cMk443tiajHyVQjkM+n7hFMXKBB/NU2bSD12vFp+smOgJte/ dNIIGl2A6QQRU8v6+VsFEzn+e1ywqki2BHryx/CNFvc5c+Y/J/+GHgRM4VM2yk/naw8e mOJTUlHL0Od09Cc2zvg0JoEz7ZL+E+n6/B3g+ge398gON4O8zBIgI6wqWu3/QRrWgcPl 82g3derRN2Crybh2+hWLP/K2OMYgoAHg0LNmekYMMfXNCtFP/l+KRm5sB9BJOmCgDefu 1O6A1P8bH6Ypf1SeZIr5oe0i1sVrTBDlUnn2/OqhIvXgeS3LFf4QQBOhfQdwvjZRDrsc IuXg== X-Gm-Message-State: ALoCoQmPwi7Vh4JLowMl+OcMiDHxkOqBk7iNYQBDYhAVKl4lmAFpJ3Of7TF03QFVSflxG4OGdPXE X-Received: by 10.112.28.111 with SMTP id a15mr26266613lbh.21.1433263626083; Tue, 02 Jun 2015 09:47:06 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.23.74 with SMTP id k10ls822211laf.30.gmail; Tue, 02 Jun 2015 09:47:05 -0700 (PDT) X-Received: by 10.153.7.104 with SMTP id db8mr27776357lad.124.1433263625866; Tue, 02 Jun 2015 09:47:05 -0700 (PDT) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com. [209.85.217.170]) by mx.google.com with ESMTPS id bb9si15513248lab.145.2015.06.02.09.47.05 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Jun 2015 09:47:05 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) client-ip=209.85.217.170; Received: by lbcmx3 with SMTP id mx3so108388910lbc.1 for ; Tue, 02 Jun 2015 09:47:05 -0700 (PDT) X-Received: by 10.152.44.166 with SMTP id f6mr27311627lam.86.1433263625440; Tue, 02 Jun 2015 09:47:05 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp3205719lbb; Tue, 2 Jun 2015 09:47:04 -0700 (PDT) X-Received: by 10.140.40.168 with SMTP id x37mr29947493qgx.24.1433263623905; Tue, 02 Jun 2015 09:47:03 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 77si16297889qkx.87.2015.06.02.09.47.03 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 02 Jun 2015 09:47:03 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:59912 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzpLD-0001yD-4w for patch@linaro.org; Tue, 02 Jun 2015 12:47:03 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40159) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yzp8a-0001ph-TU for qemu-devel@nongnu.org; Tue, 02 Jun 2015 12:34:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yzp8Z-0000vz-2t for qemu-devel@nongnu.org; Tue, 02 Jun 2015 12:34:00 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:34364) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yzp8Y-0000r2-RK for qemu-devel@nongnu.org; Tue, 02 Jun 2015 12:33:58 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1Yzp8T-00031F-5U for qemu-devel@nongnu.org; Tue, 02 Jun 2015 17:33:53 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Tue, 2 Jun 2015 17:33:40 +0100 Message-Id: <1433262832-11527-11-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1433262832-11527-1-git-send-email-peter.maydell@linaro.org> References: <1433262832-11527-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Subject: [Qemu-devel] [PULL 10/22] Revert "target-arm: Avoid g_hash_table_get_keys()" X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Markus Armbruster Since we now require GLib 2.22+ (commit f40685c), we don't have to work around lack of g_hash_table_get_keys() anymore. This reverts commit 82a3a11897308b606120f7235001e87809708f85. Signed-off-by: Markus Armbruster Message-id: 1432749090-4698-1-git-send-email-armbru@redhat.com Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target-arm/helper.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/target-arm/helper.c b/target-arm/helper.c index 7214d99..0cf446e 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -294,23 +294,15 @@ static gint cpreg_key_compare(gconstpointer a, gconstpointer b) return 0; } -static void cpreg_make_keylist(gpointer key, gpointer value, gpointer udata) -{ - GList **plist = udata; - - *plist = g_list_prepend(*plist, key); -} - void init_cpreg_list(ARMCPU *cpu) { /* Initialise the cpreg_tuples[] array based on the cp_regs hash. * Note that we require cpreg_tuples[] to be sorted by key ID. */ - GList *keys = NULL; + GList *keys; int arraylen; - g_hash_table_foreach(cpu->cp_regs, cpreg_make_keylist, &keys); - + keys = g_hash_table_get_keys(cpu->cp_regs); keys = g_list_sort(keys, cpreg_key_compare); cpu->cpreg_array_len = 0;