Skip to contentSkip to conversation

target/loongarch: Remove some unnecessary target_ulong uses

PATCH In review Philippe Mathieu-Daudé 3 participants 15 messages Oct 9, 2025 – Oct 15, 2025

lore
Share & tools
lore
#0 lore raw

cover target/loongarch: Remove some unnecessary target_ulong uses

Remove few invalid target_ulong uses in LoongArch frontend.

Philippe Mathieu-Daudé (4):
hw/loongarch/boot: Remove unnecessary cast to target_ulong target/loongarch: Remove target_ulong use in gen_goto_tb() target/loongarch: Remove target_ulong use in gdb_write_register
handler
target/loongarch: Do not use target_ulong type for LDDIR level

 target/loongarch/cpu-mmu.h                             | 2 +-
 target/loongarch/tcg/helper.h                          | 2 +-
 hw/loongarch/boot.c                                    | 7 ++++---
 target/loongarch/cpu_helper.c                          | 2 +-
 target/loongarch/gdbstub.c                             | 2 +-
 target/loongarch/tcg/tlb_helper.c                      | 4 ++--
 target/loongarch/tcg/translate.c                       | 2 +-
 target/loongarch/tcg/insn_trans/trans_privileged.c.inc | 2 +-
 8 files changed, 12 insertions(+), 11 deletions(-)
Signature · 1 line
2.51.0
#1 lore raw

PATCH 1/4 hw/loongarch/boot: Remove unnecessary cast to target_ulong

Reduce initrd_size scope. It is already of signed type (ssize_t), no need to cast to unsigned for the comparison.

---
 hw/loongarch/boot.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
hw/loongarch/boot.c +4 -3
index a516415822d..3dd48cb8aab 100644
@@ -306,7 +306,7 @@ static ram_addr_t alloc_initrd_memory(struct loongarch_boot_info *info,
 static int64_t load_kernel_info(struct loongarch_boot_info *info)
 {
     uint64_t kernel_entry, kernel_low, kernel_high, initrd_offset = 0;
-    ssize_t kernel_size, initrd_size;
+    ssize_t kernel_size;
 
     kernel_size = load_elf(info->kernel_filename, NULL,
                            cpu_loongarch_virt_to_phys, NULL,
@@ -328,7 +328,8 @@ static int64_t load_kernel_info(struct loongarch_boot_info *info)
     }
 
     if (info->initrd_filename) {
-        initrd_size = get_image_size(info->initrd_filename);
+        ssize_t initrd_size = get_image_size(info->initrd_filename);
+
         if (initrd_size > 0) {
             initrd_offset = ROUND_UP(kernel_high + 4 * kernel_size, 64 * KiB);
             initrd_offset = alloc_initrd_memory(info, initrd_offset,
@@ -337,7 +338,7 @@ static int64_t load_kernel_info(struct loongarch_boot_info *info)
                                               initrd_offset, initrd_size);
         }
 
-        if (initrd_size == (target_ulong)-1) {
+        if (initrd_size == -1) {
             error_report("could not load initial ram disk '%s'",
                          info->initrd_filename);
             exit(1);
Signature · 1 line
2.51.0
Reviewed-by on v1 1/4
#2 lore raw

Re: [PATCH 1/4] hw/loongarch/boot: Remove unnecessary cast to target_ulong

Quoted 32 lines · Philippe Mathieu-Daudé

Reduce initrd_size scope. It is already of signed type (ssize_t), no need to cast to unsigned for the comparison.

---
  hw/loongarch/boot.c | 7 ++++---
  1 file changed, 4 insertions(+), 3 deletions(-)
hw/loongarch/boot.c +3 -2
index a516415822d..3dd48cb8aab 100644
@@ -306,7 +306,7 @@ static ram_addr_t alloc_initrd_memory(struct loongarch_boot_info *info,
  static int64_t load_kernel_info(struct loongarch_boot_info *info)
  {
      uint64_t kernel_entry, kernel_low, kernel_high, initrd_offset = 0;
-    ssize_t kernel_size, initrd_size;
+    ssize_t kernel_size;
 
      kernel_size = load_elf(info->kernel_filename, NULL,
                             cpu_loongarch_virt_to_phys, NULL,
@@ -328,7 +328,8 @@ static int64_t load_kernel_info(struct loongarch_boot_info *info)
      }
 
      if (info->initrd_filename) {
-        initrd_size = get_image_size(info->initrd_filename);
+        ssize_t initrd_size = get_image_size(info->initrd_filename);
+
          if (initrd_size > 0) {
              initrd_offset = ROUND_UP(kernel_high + 4 * kernel_size, 64 * KiB);
              initrd_offset = alloc_initrd_memory(info, initrd_offset,

hw/loongarch/boot.c static int64_t load_kernel_info(struct loongarch_boot_info *info) · line 344

Quoted 8 lines
hw/loongarch/boot.c +1 -1
@@ -337,7 +338,7 @@ static int64_t load_kernel_info(struct loongarch_boot_info *info)
                                                initrd_offset, initrd_size);
          }
 
-        if (initrd_size == (target_ulong)-1) {
+        if (initrd_size == -1) {
              error_report("could not load initial ram disk '%s'",
                           info->initrd_filename);
              exit(1);

r~

#3 lore raw

Re: [PATCH 1/4] hw/loongarch/boot: Remove unnecessary cast to target_ulong

In reply to Philippe Mathieu-Daudé
Quoted 7 lines · Philippe Mathieu-Daudé

Reduce initrd_size scope. It is already of signed type (ssize_t), no need to cast to unsigned for the comparison.

---
  hw/loongarch/boot.c | 7 ++++---
  1 file changed, 4 insertions(+), 3 deletions(-)

Thanks.
Song Gao

Quoted 32 lines
hw/loongarch/boot.c +4 -3
index a516415822d..3dd48cb8aab 100644
@@ -306,7 +306,7 @@ static ram_addr_t alloc_initrd_memory(struct loongarch_boot_info *info,
  static int64_t load_kernel_info(struct loongarch_boot_info *info)
  {
      uint64_t kernel_entry, kernel_low, kernel_high, initrd_offset = 0;
-    ssize_t kernel_size, initrd_size;
+    ssize_t kernel_size;
 
      kernel_size = load_elf(info->kernel_filename, NULL,
                             cpu_loongarch_virt_to_phys, NULL,
@@ -328,7 +328,8 @@ static int64_t load_kernel_info(struct loongarch_boot_info *info)
      }
 
      if (info->initrd_filename) {
-        initrd_size = get_image_size(info->initrd_filename);
+        ssize_t initrd_size = get_image_size(info->initrd_filename);
+
          if (initrd_size > 0) {
              initrd_offset = ROUND_UP(kernel_high + 4 * kernel_size, 64 * KiB);
              initrd_offset = alloc_initrd_memory(info, initrd_offset,
@@ -337,7 +338,7 @@ static int64_t load_kernel_info(struct loongarch_boot_info *info)
                                                initrd_offset, initrd_size);
          }
 
-        if (initrd_size == (target_ulong)-1) {
+        if (initrd_size == -1) {
              error_report("could not load initial ram disk '%s'",
                           info->initrd_filename);
              exit(1);
#4 lore raw

PATCH 2/4 target/loongarch: Remove target_ulong use in gen_goto_tb()

In reply to Philippe Mathieu-Daudé

translator_use_goto_tb() expects a vaddr type since commit b1c09220b4c ("accel/tcg: Replace target_ulong with vaddr in translator*()").

---
 target/loongarch/tcg/translate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target/loongarch/tcg/translate.c +1 -1
index 53a0b4c3ce9..e30b64c0e05 100644
@@ -99,7 +99,7 @@ void generate_exception(DisasContext *ctx, int excp)
     ctx->base.is_jmp = DISAS_NORETURN;
 }
 
-static inline void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest)
+static inline void gen_goto_tb(DisasContext *ctx, int n, vaddr dest)
 {
     if (ctx->va32) {
         dest = (uint32_t) dest;
Signature · 1 line
2.51.0
Reviewed-by on v1 2/4
#5 lore raw

Re: [PATCH 2/4] target/loongarch: Remove target_ulong use in gen_goto_tb()

Quoted 14 lines · Philippe Mathieu-Daudé

translator_use_goto_tb() expects a vaddr type since commit b1c09220b4c ("accel/tcg: Replace target_ulong with vaddr in translator*()").

---
  target/loongarch/tcg/translate.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
target/loongarch/tcg/translate.c +0 -0
index 53a0b4c3ce9..e30b64c0e05 100644

target/loongarch/tcg/translate.c void generate_exception(DisasContext *ctx, int excp) · line 105

Quoted 8 lines
target/loongarch/tcg/translate.c +1 -1
@@ -99,7 +99,7 @@ void generate_exception(DisasContext *ctx, int excp)
      ctx->base.is_jmp = DISAS_NORETURN;
  }
 
-static inline void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest)
+static inline void gen_goto_tb(DisasContext *ctx, int n, vaddr dest)
  {
      if (ctx->va32) {
          dest = (uint32_t) dest;

r~

#6 lore raw

Re: [PATCH 2/4] target/loongarch: Remove target_ulong use in gen_goto_tb()

In reply to Philippe Mathieu-Daudé
Quoted 8 lines · Philippe Mathieu-Daudé

translator_use_goto_tb() expects a vaddr type since commit b1c09220b4c ("accel/tcg: Replace target_ulong with vaddr in translator*()").

---
  target/loongarch/tcg/translate.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks.
Song Gao

Quoted 13 lines
target/loongarch/tcg/translate.c +1 -1
index 53a0b4c3ce9..e30b64c0e05 100644
@@ -99,7 +99,7 @@ void generate_exception(DisasContext *ctx, int excp)
      ctx->base.is_jmp = DISAS_NORETURN;
  }
 
-static inline void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest)
+static inline void gen_goto_tb(DisasContext *ctx, int n, vaddr dest)
  {
      if (ctx->va32) {
          dest = (uint32_t) dest;
#7 lore raw

PATCH 3/4 target/loongarch: Remove target_ulong use in gdb_write_register handler

In reply to Philippe Mathieu-Daudé

ldq_le_p() returns a uint64_t type, big enough to also hold ldl_le_p() return value. If we were building for a 32-bit LoongArch target, ldq_le_p() would not fit in target_ulong. Better stick to plain uint64_t.

---
 target/loongarch/gdbstub.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target/loongarch/gdbstub.c +1 -1
index 471eda28c73..23a5eecc20b 100644
@@ -62,7 +62,7 @@ int loongarch_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n)
 int loongarch_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
 {
     CPULoongArchState *env = cpu_env(cs);
-    target_ulong tmp;
+    uint64_t tmp;
     int length = 0;
 
     if (n < 0 || n > 34) {
Signature · 1 line
2.51.0
Reviewed-by on v1 3/4
#8 lore raw

Re: [PATCH 3/4] target/loongarch: Remove target_ulong use in gdb_write_register handler

Quoted 15 lines · Philippe Mathieu-Daudé

ldq_le_p() returns a uint64_t type, big enough to also hold ldl_le_p() return value. If we were building for a 32-bit LoongArch target, ldq_le_p() would not fit in target_ulong. Better stick to plain uint64_t.

---
  target/loongarch/gdbstub.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
target/loongarch/gdbstub.c +0 -0
index 471eda28c73..23a5eecc20b 100644

target/loongarch/gdbstub.c int loongarch_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n) · line 68

Quoted 8 lines
target/loongarch/gdbstub.c +1 -1
@@ -62,7 +62,7 @@ int loongarch_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n)
  int loongarch_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
  {
      CPULoongArchState *env = cpu_env(cs);
-    target_ulong tmp;
+    uint64_t tmp;
      int length = 0;
 
      if (n < 0 || n > 34) {

r~

#9 lore raw

Re: [PATCH 3/4] target/loongarch: Remove target_ulong use in gdb_write_register handler

In reply to Philippe Mathieu-Daudé
Quoted 9 lines · Philippe Mathieu-Daudé

ldq_le_p() returns a uint64_t type, big enough to also hold ldl_le_p() return value. If we were building for a 32-bit LoongArch target, ldq_le_p() would not fit in target_ulong. Better stick to plain uint64_t.

---
  target/loongarch/gdbstub.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks.
Song Gao

Quoted 13 lines
target/loongarch/gdbstub.c +1 -1
index 471eda28c73..23a5eecc20b 100644
@@ -62,7 +62,7 @@ int loongarch_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n)
  int loongarch_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
  {
      CPULoongArchState *env = cpu_env(cs);
-    target_ulong tmp;
+    uint64_t tmp;
      int length = 0;
 
      if (n < 0 || n > 34) {
#10 lore raw

PATCH 4/4 target/loongarch: Do not use target_ulong type for LDDIR level

In reply to Philippe Mathieu-Daudé

The LDDIR level page table is a 5-bit immediate. Using the uint32_t type for it is sufficient. Avoid the target_ulong type.

---
 target/loongarch/cpu-mmu.h                             | 2 +-
 target/loongarch/tcg/helper.h                          | 2 +-
 target/loongarch/cpu_helper.c                          | 2 +-
 target/loongarch/tcg/tlb_helper.c                      | 4 ++--
 target/loongarch/tcg/insn_trans/trans_privileged.c.inc | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)
target/loongarch/cpu-mmu.h +1 -1
index 0068d22efcb..dbc69c7c0f2 100644
@@ -34,7 +34,7 @@ TLBRet get_physical_address(CPULoongArchState *env, MMUContext *context,
                             MMUAccessType access_type, int mmu_idx,
                             int is_debug);
 void get_dir_base_width(CPULoongArchState *env, uint64_t *dir_base,
-                               uint64_t *dir_width, target_ulong level);
+                        uint64_t *dir_width, unsigned int level);
 hwaddr loongarch_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr);
 
 #endif  /* LOONGARCH_CPU_MMU_H */
target/loongarch/tcg/helper.h +1 -1
index db57dbfc167..7e508c5a7b9 100644
@@ -129,7 +129,7 @@ DEF_HELPER_2(invtlb_all_asid, void, env, tl)
 DEF_HELPER_3(invtlb_page_asid, void, env, tl, tl)
 DEF_HELPER_3(invtlb_page_asid_or_g, void, env, tl, tl)
 
-DEF_HELPER_4(lddir, tl, env, tl, tl, i32)
+DEF_HELPER_4(lddir, tl, env, tl, i32, i32)
 DEF_HELPER_4(ldpte, void, env, tl, tl, i32)
 DEF_HELPER_1(ertn, void, env)
 DEF_HELPER_1(idle, void, env)
target/loongarch/cpu_helper.c +1 -1
index 4a9db3ea4c1..867e7c88670 100644
@@ -17,7 +17,7 @@
 #include "tcg/tcg_loongarch.h"
 
 void get_dir_base_width(CPULoongArchState *env, uint64_t *dir_base,
-                        uint64_t *dir_width, target_ulong level)
+                        uint64_t *dir_width, unsigned int level)
 {
     switch (level) {
     case 1:
target/loongarch/tcg/tlb_helper.c +2 -2
index 8cfce48a297..f85b68fa53d 100644
@@ -595,7 +595,7 @@ bool loongarch_cpu_tlb_fill(CPUState *cs, vaddr address, int size,
 }
 
 target_ulong helper_lddir(CPULoongArchState *env, target_ulong base,
-                          target_ulong level, uint32_t mem_idx)
+                          uint32_t level, uint32_t mem_idx)
 {
     CPUState *cs = env_cpu(env);
     target_ulong badvaddr, index, phys;
@@ -603,7 +603,7 @@ target_ulong helper_lddir(CPULoongArchState *env, target_ulong base,
 
     if (unlikely((level == 0) || (level > 4))) {
         qemu_log_mask(LOG_GUEST_ERROR,
-                      "Attepted LDDIR with level %"PRId64"\n", level);
+                      "Attepted LDDIR with level %u\n", level);
         return base;
     }
 
target/loongarch/tcg/insn_trans/trans_privileged.c.inc +1 -1
index a407ab51b74..64e53a44606 100644
@@ -380,7 +380,7 @@ static bool trans_lddir(DisasContext *ctx, arg_lddir *a)
     if (check_plv(ctx)) {
         return false;
     }
-    gen_helper_lddir(dest, tcg_env, src, tcg_constant_tl(a->imm), mem_idx);
+    gen_helper_lddir(dest, tcg_env, src, tcg_constant_i32(a->imm), mem_idx);
     return true;
 }
 
Signature · 1 line
2.51.0
Reviewed-by on v1 4/4
#11 lore raw

Re: [PATCH 4/4] target/loongarch: Do not use target_ulong type for LDDIR level

Quoted 11 lines · Philippe Mathieu-Daudé

The LDDIR level page table is a 5-bit immediate. Using the uint32_t type for it is sufficient. Avoid the target_ulong type.

---
  target/loongarch/cpu-mmu.h                             | 2 +-
  target/loongarch/tcg/helper.h                          | 2 +-
  target/loongarch/cpu_helper.c                          | 2 +-
  target/loongarch/tcg/tlb_helper.c                      | 4 ++--
  target/loongarch/tcg/insn_trans/trans_privileged.c.inc | 2 +-
  5 files changed, 6 insertions(+), 6 deletions(-)

r~

#12 lore raw

Re: [PATCH 4/4] target/loongarch: Do not use target_ulong type for LDDIR level

In reply to Philippe Mathieu-Daudé
Quoted 11 lines · Philippe Mathieu-Daudé

The LDDIR level page table is a 5-bit immediate. Using the uint32_t type for it is sufficient. Avoid the target_ulong type.

---
  target/loongarch/cpu-mmu.h                             | 2 +-
  target/loongarch/tcg/helper.h                          | 2 +-
  target/loongarch/cpu_helper.c                          | 2 +-
  target/loongarch/tcg/tlb_helper.c                      | 4 ++--
  target/loongarch/tcg/insn_trans/trans_privileged.c.inc | 2 +-
  5 files changed, 6 insertions(+), 6 deletions(-)

Thanks.
Song Gao

Quoted 74 lines
target/loongarch/cpu-mmu.h +1 -1
index 0068d22efcb..dbc69c7c0f2 100644
@@ -34,7 +34,7 @@ TLBRet get_physical_address(CPULoongArchState *env, MMUContext *context,
                              MMUAccessType access_type, int mmu_idx,
                              int is_debug);
  void get_dir_base_width(CPULoongArchState *env, uint64_t *dir_base,
-                               uint64_t *dir_width, target_ulong level);
+                        uint64_t *dir_width, unsigned int level);
  hwaddr loongarch_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr);
 
  #endif  /* LOONGARCH_CPU_MMU_H */
target/loongarch/tcg/helper.h +1 -1
index db57dbfc167..7e508c5a7b9 100644
@@ -129,7 +129,7 @@ DEF_HELPER_2(invtlb_all_asid, void, env, tl)
  DEF_HELPER_3(invtlb_page_asid, void, env, tl, tl)
  DEF_HELPER_3(invtlb_page_asid_or_g, void, env, tl, tl)
 
-DEF_HELPER_4(lddir, tl, env, tl, tl, i32)
+DEF_HELPER_4(lddir, tl, env, tl, i32, i32)
  DEF_HELPER_4(ldpte, void, env, tl, tl, i32)
  DEF_HELPER_1(ertn, void, env)
  DEF_HELPER_1(idle, void, env)
target/loongarch/cpu_helper.c +1 -1
index 4a9db3ea4c1..867e7c88670 100644
@@ -17,7 +17,7 @@
  #include "tcg/tcg_loongarch.h"
 
  void get_dir_base_width(CPULoongArchState *env, uint64_t *dir_base,
-                        uint64_t *dir_width, target_ulong level)
+                        uint64_t *dir_width, unsigned int level)
  {
      switch (level) {
      case 1:
target/loongarch/tcg/tlb_helper.c +2 -2
index 8cfce48a297..f85b68fa53d 100644
@@ -595,7 +595,7 @@ bool loongarch_cpu_tlb_fill(CPUState *cs, vaddr address, int size,
  }
 
  target_ulong helper_lddir(CPULoongArchState *env, target_ulong base,
-                          target_ulong level, uint32_t mem_idx)
+                          uint32_t level, uint32_t mem_idx)
  {
      CPUState *cs = env_cpu(env);
      target_ulong badvaddr, index, phys;
@@ -603,7 +603,7 @@ target_ulong helper_lddir(CPULoongArchState *env, target_ulong base,
 
      if (unlikely((level == 0) || (level > 4))) {
          qemu_log_mask(LOG_GUEST_ERROR,
-                      "Attepted LDDIR with level %"PRId64"\n", level);
+                      "Attepted LDDIR with level %u\n", level);
          return base;
      }
 
target/loongarch/tcg/insn_trans/trans_privileged.c.inc +1 -1
index a407ab51b74..64e53a44606 100644
@@ -380,7 +380,7 @@ static bool trans_lddir(DisasContext *ctx, arg_lddir *a)
      if (check_plv(ctx)) {
          return false;
      }
-    gen_helper_lddir(dest, tcg_env, src, tcg_constant_tl(a->imm), mem_idx);
+    gen_helper_lddir(dest, tcg_env, src, tcg_constant_i32(a->imm), mem_idx);
      return true;
  }
 
Reviewed-by on the v1 series
#13 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 9 lines · Philippe Mathieu-Daudé

Remove few invalid target_ulong uses in LoongArch frontend.

Philippe Mathieu-Daudé (4):
hw/loongarch/boot: Remove unnecessary cast to target_ulong target/loongarch: Remove target_ulong use in gen_goto_tb() target/loongarch: Remove target_ulong use in gdb_write_register
handler
target/loongarch: Do not use target_ulong type for LDDIR level

Quoted 10 lines
  target/loongarch/cpu-mmu.h                             | 2 +-
  target/loongarch/tcg/helper.h                          | 2 +-
  hw/loongarch/boot.c                                    | 7 ++++---
  target/loongarch/cpu_helper.c                          | 2 +-
  target/loongarch/gdbstub.c                             | 2 +-
  target/loongarch/tcg/tlb_helper.c                      | 4 ++--
  target/loongarch/tcg/translate.c                       | 2 +-
  target/loongarch/tcg/insn_trans/trans_privileged.c.inc | 2 +-
  8 files changed, 12 insertions(+), 11 deletions(-)

Sorry for the wrong  'sig

Thanks.
Song Gao

#14 lore raw
Quoted 20 lines · gaosong
Quoted 17 lines · Philippe Mathieu-Daudé

Remove few invalid target_ulong uses in LoongArch frontend.

Philippe Mathieu-Daudé (4):
   hw/loongarch/boot: Remove unnecessary cast to target_ulong target/loongarch: Remove target_ulong use in gen_goto_tb() target/loongarch: Remove target_ulong use in gdb_write_register handler
   target/loongarch: Do not use target_ulong type for LDDIR level

  target/loongarch/cpu-mmu.h                             | 2 +- target/loongarch/tcg/helper.h                          | 2 +- hw/loongarch/boot.c                                    | 7 ++++--- target/loongarch/cpu_helper.c                          | 2 +- target/loongarch/gdbstub.c                             | 2 +- target/loongarch/tcg/tlb_helper.c                      | 4 ++-- target/loongarch/tcg/translate.c                       | 2 +- target/loongarch/tcg/insn_trans/trans_privileged.c.inc | 2 +-

Quoted 2 lines
  8 files changed, 12 insertions(+), 11 deletions(-)
Quoted 2 lines

Sorry for the wrong  'sig

Thanks! Series queued.