On 16/9/25 16:22, Richard Henderson wrote:
All callers now pass in->name, so take the value from there.

Signed-off-by: Richard Henderson <[email protected]>
---
  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 *suffix)
  {
+    const char *name = in->name;

This is internal API call, but still, should we assert for non-NULL?
Regardless,

Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Tested-by: Philippe Mathieu-Daudé <[email protected]>

      size_t name_len = strlen(name);
      size_t suff_len = suffix ? strlen(suffix) : 0;
      ARMCPRegInfo *out = g_malloc(sizeof(*in) + name_len + suff_len + 1);


Reply via email to