From nobody Sun Sep 28 17:08:29 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1758033141; cv=none; d=zohomail.com; s=zohoarc; b=InlMVVs8WVCcR357LPfi///p1cbNBlm6LL3uD0O89hoG3xh6MQsnh27Wq43Y8CpukbVQpAoEgVfM8AyKKkHbhT/iiQ/PYwFxspH03oGZr/V9tl1rsI2HpObhn8kAkFRukRGX6m/Opfi6bOJmZBV5+kfYfyfGTZvv1jpu0Pm4/Wk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758033141; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=hg2xV4nRaM7n2VIoSbN3KehS3wFi1JQVp0YcyiarUG8=; b=VN+OgUlGgK6tJIv1a/mS2Dd4FxYNkXYmglQZVifSb9oibYObWQyZ8oKMFD/g5RK85WlJ8n/JSPqlpVhk/LDRv8+cjiOSyZIO/YiJJkQtcjS49zc07Ma5T+qDbyDCyKa0iywNyx/VjDyAcF3/8L+HPS3szei4IdrL/9edYWW5waY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1758033141263659.6844994466195; Tue, 16 Sep 2025 07:32:21 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uyWcr-0000IH-HN; Tue, 16 Sep 2025 10:25:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uyWam-0006BI-Vd for qemu-devel@nongnu.org; Tue, 16 Sep 2025 10:23:37 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uyWaU-0008NE-H8 for qemu-devel@nongnu.org; Tue, 16 Sep 2025 10:23:30 -0400 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-2677a4d4ce3so21204795ad.0 for ; Tue, 16 Sep 2025 07:23:01 -0700 (PDT) Received: from stoup.. ([71.212.157.132]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2651d2df15esm73459905ad.45.2025.09.16.07.22.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Sep 2025 07:23:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1758032581; x=1758637381; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hg2xV4nRaM7n2VIoSbN3KehS3wFi1JQVp0YcyiarUG8=; b=YP1IejkqUTkDdKes6iR03Wi59QwgIQ20Ip1Z4rkmZFq2McIu1Zkj/88mSRvIH4ly24 jAkgwCqNno6VSYFPgFOtav0lZ0iMyODgwOkq43S9ZHB0FvolCF19KZ6hDQfde6f0B0Vu ZGfa0517RF9aQmFFNXjgjTdONOjWryOgqsvhAFE400eDggaN2iL4cDvneYL2TQ9BfEVz 9heUatPbvzXAjP8CYMxopFGCucy+jDQNVw0Q4hoAilDV0vqR9qAwXt+bSGUiG3Isdhzj K/Vs7OjehWG3wu2QXiHH53K6HX9nRGhOAtJ+v0clo1O6ScWydixvCFlSYZUKZYp7Y53X riNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758032581; x=1758637381; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hg2xV4nRaM7n2VIoSbN3KehS3wFi1JQVp0YcyiarUG8=; b=h69Xg4Yzrvda5V+sIhwghkaHbMSOXS6IQnNXjF6D6ADzDC+oAkh+yXvZ/trzPou4BN xBFVf8uqQSdTP7p1Ae8B8+H4C3B1zXM358ays7vfNbEuPF3OaqGYgrDqvE18eQgf6ZKh RoxRM0++hfisp/MVcHC+FEWpKhYHtzWh+CXvyGpCH7bEfFLIQz6yMHV82A05k479FaVU WI8EbNETDZH+utWgFtTtriK7Jx0VHo8gXid5Vl5SgdDqEAvyLi44biaTTdqJub993DR5 qoHz36V/Khuuziu72IneiSrw3rcZFb6MEWurMFBi5wvOS69wkfSMkbz7Yz5G9Wtn1vsm bQ6w== X-Gm-Message-State: AOJu0YwH8IoOTqstLzARIjgGfSkOpCjEJvkrFBMWAJZZZCU8KZGxH5xf n1vJ26CpiSh4Vn6Hp5YMUtTInAiNuTyTm7y8HLhX5Weq0u/PLbxKQGSb0Rgmd00pSQRAOvAWMMf n+MGd X-Gm-Gg: ASbGnctgePf58Uq5DXQuVo+1hvlRE0bJzcZEBHqGddDxjGsItwpf5uRopP/1O14p5Vp u2LBjeQ/HC1z4wRxXTLI145WRQPFZJ3cE/BeZR1AZv0cCzxTRQ1bP0vzP9+de44ltpls09W54Fb OqZpCmwVnrlC6tUBoJcv94C54t/7sA2+M7e/3DkiIZiQFbZMTp6RT9k7zETaokAG1w1Y8dhvaMm mXdHrSRUx32zsjik/upObUfSIk/2m6kHC2R/itrBLYZDwuIXra+O+aA2KYgQXtefjbH4ljE35bu uKHYYFh+tbqLVKwzo443Wu9RiTHQd+p4N9vTmHnT2zsyzu/uew6zhwMA6/ZOyJ8Ft947x7s6a6A 7cMGB0snNU1hiHQmQFv5mQ4UPt9Q0 X-Google-Smtp-Source: AGHT+IGPpZrUMRb7VyZtwEqPUXOvvyc9FIxx7TNhRTr1GvaneXPY5/aKjU2uh2HQ7eIfkAFQoCijXw== X-Received: by 2002:a17:903:2f0f:b0:24b:1589:5054 with SMTP id d9443c01a7336-25d250961b0mr203823045ad.23.1758032580737; Tue, 16 Sep 2025 07:23:00 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, peter.maydell@linaro.org Subject: [PATCH v2 27/36] target/arm: Remove name argument to alloc_cpreg Date: Tue, 16 Sep 2025 07:22:28 -0700 Message-ID: <20250916142238.664316-28-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250916142238.664316-1-richard.henderson@linaro.org> References: <20250916142238.664316-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::62c; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1758033142588116600 Content-Type: text/plain; charset="utf-8" All callers now pass in->name, so take the value from there. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 --- target/arm/helper.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index 71dd094fac..da3dd073d3 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -7421,9 +7421,9 @@ void register_cp_regs_for_features(ARMCPU *cpu) * Copy a ARMCPRegInfo structure, allocating it along with the name * and an optional suffix to the name. */ -static ARMCPRegInfo *alloc_cpreg(const ARMCPRegInfo *in, - const char *name, const char *suffix) +static ARMCPRegInfo *alloc_cpreg(const ARMCPRegInfo *in, const char *suffi= x) { + const char *name =3D in->name; size_t name_len =3D strlen(name); size_t suff_len =3D suffix ? strlen(suffix) : 0; ARMCPRegInfo *out =3D g_malloc(sizeof(*in) + name_len + suff_len + 1); @@ -7563,7 +7563,7 @@ static void add_cpreg_to_hashtable_aa32(ARMCPU *cpu, = ARMCPRegInfo *r, cp, crm, opc1, opc2, key); break; case ARM_CP_SECSTATE_BOTH: - r_s =3D alloc_cpreg(r, r->name, "_S"); + r_s =3D alloc_cpreg(r, "_S"); add_cpreg_to_hashtable(cpu, r_s, ARM_CP_STATE_AA32, ARM_CP_SECSTAT= E_S, cp, crm, opc1, opc2, key); =20 @@ -7593,7 +7593,7 @@ static void add_cpreg_to_hashtable_aa64(ARMCPU *cpu, = ARMCPRegInfo *r, * and name that it is passed, so it's OK to use * a local struct here. */ - ARMCPRegInfo *nxs_ri =3D alloc_cpreg(r, r->name, "NXS"); + ARMCPRegInfo *nxs_ri =3D alloc_cpreg(r, "NXS"); uint32_t nxs_key; =20 assert(nxs_ri->crn < 0xf); @@ -7816,7 +7816,7 @@ void define_one_arm_cp_reg(ARMCPU *cpu, const ARMCPRe= gInfo *r) for (int crm =3D crmmin; crm <=3D crmmax; crm++) { for (int opc1 =3D opc1min; opc1 <=3D opc1max; opc1++) { for (int opc2 =3D opc2min; opc2 <=3D opc2max; opc2++) { - ARMCPRegInfo *r2 =3D alloc_cpreg(r, r->name, NULL); + ARMCPRegInfo *r2 =3D alloc_cpreg(r, NULL); ARMCPRegInfo *r3; =20 switch (r->state) { @@ -7827,7 +7827,7 @@ void define_one_arm_cp_reg(ARMCPU *cpu, const ARMCPRe= gInfo *r) add_cpreg_to_hashtable_aa64(cpu, r2, crm, opc1, opc2); break; case ARM_CP_STATE_BOTH: - r3 =3D alloc_cpreg(r2, r2->name, NULL); + r3 =3D alloc_cpreg(r2, NULL); add_cpreg_to_hashtable_aa32(cpu, r2, cp, crm, opc1, op= c2); add_cpreg_to_hashtable_aa64(cpu, r3, crm, opc1, opc2); break; --=20 2.43.0