From nobody Wed Feb 11 02:54:41 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1508215044709233.441135719748; Mon, 16 Oct 2017 21:37:24 -0700 (PDT) Received: from localhost ([::1]:36412 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e4Jd3-00049f-PF for importer@patchew.org; Tue, 17 Oct 2017 00:37:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50699) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e4JOb-0008Q5-Fm for qemu-devel@nongnu.org; Tue, 17 Oct 2017 00:22:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e4JOZ-000787-5O for qemu-devel@nongnu.org; Tue, 17 Oct 2017 00:22:25 -0400 Received: from ozlabs.org ([2401:3900:2:1::2]:57025) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e4JOY-00073T-Mw; Tue, 17 Oct 2017 00:22:22 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 3yGMTw4kwKz9t41; Tue, 17 Oct 2017 15:22:10 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1508214132; bh=XsKqrO5LaObaFhzOSNaAR8Nx/2XqnDQ461C6S0lmpyU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jF3+xKWXxGXKMlKsxMmQyYshpwYrZnUhgDOW+rMwG2Hk7RPaH7Rf2ubhoGKeLkD5j Fwzbk0SmzeX4YM8KPd6OXW2uLsySGqOwNC8cdxm6mFqc4ZpBUMnWzA3y+z28Vs26/x a6sLZYsqgcG9vV4hNELeTRF8erLQsSrJVpCzKfuo= From: David Gibson To: peter.maydell@linaro.org Date: Tue, 17 Oct 2017 15:21:42 +1100 Message-Id: <20171017042152.29443-25-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171017042152.29443-1-david@gibson.dropbear.id.au> References: <20171017042152.29443-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2401:3900:2:1::2 Subject: [Qemu-devel] [PULL 24/34] ppc: move ppc_cpu_lookup_alias() before its first user X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: agraf@suse.de, ehabkost@redhat.com, qemu-devel@nongnu.org, groug@kaod.org, qemu-ppc@nongnu.org, imammedo@redhat.com, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Igor Mammedov next commit will drop ppc_cpu_lookup_alias() declaration from header and make it static which will break its last user ppc_cpu_class_by_name() since ppc_cpu_class_by_name() defined before ppc_cpu_lookup_alias(). To avoid this move ppc_cpu_lookup_alias() right before ppc_cpu_class_by_name(). Signed-off-by: Igor Mammedov Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: David Gibson --- target/ppc/translate_init.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/target/ppc/translate_init.c b/target/ppc/translate_init.c index 3d16481ca1..17ac95b732 100644 --- a/target/ppc/translate_init.c +++ b/target/ppc/translate_init.c @@ -10060,6 +10060,19 @@ PowerPCCPUClass *ppc_cpu_class_by_pvr_mask(uint32_= t pvr) return pcc; } =20 +const char *ppc_cpu_lookup_alias(const char *alias) +{ + int ai; + + for (ai =3D 0; ppc_cpu_aliases[ai].alias !=3D NULL; ai++) { + if (strcmp(ppc_cpu_aliases[ai].alias, alias) =3D=3D 0) { + return ppc_cpu_aliases[ai].model; + } + } + + return NULL; +} + static ObjectClass *ppc_cpu_class_by_name(const char *name) { char *cpu_model, *typename; @@ -10152,19 +10165,6 @@ static void ppc_cpu_parse_featurestr(const char *t= ype, char *features, pcc->parent_parse_features(type, features, errp); } =20 -const char *ppc_cpu_lookup_alias(const char *alias) -{ - int ai; - - for (ai =3D 0; ppc_cpu_aliases[ai].alias !=3D NULL; ai++) { - if (strcmp(ppc_cpu_aliases[ai].alias, alias) =3D=3D 0) { - return ppc_cpu_aliases[ai].model; - } - } - - return NULL; -} - PowerPCCPUClass *ppc_cpu_get_family_class(PowerPCCPUClass *pcc) { ObjectClass *oc =3D OBJECT_CLASS(pcc); --=20 2.13.6