diff mbox series

[2/4] target/s390x/dump: Remove unneeded dump info function pointer init

Message ID 20231107142048.22422-3-frankja@linux.ibm.com (mailing list archive)
State New, archived
Headers show
Series dump: Arch info function pointer addition and cleanup | expand

Commit Message

Janosch Frank Nov. 7, 2023, 2:20 p.m. UTC
dump_state_prepare() now sets the fucntion pointers to NULL so we only
need to touch them if we're going to use them.

Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
---
 target/s390x/arch_dump.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Claudio Imbrenda Nov. 7, 2023, 5:12 p.m. UTC | #1
On Tue,  7 Nov 2023 14:20:46 +0000
Janosch Frank <frankja@linux.ibm.com> wrote:

> dump_state_prepare() now sets the fucntion pointers to NULL so we only
> need to touch them if we're going to use them.
> 
> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>

I would merge this and the previous patch

> ---
>  target/s390x/arch_dump.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/target/s390x/arch_dump.c b/target/s390x/arch_dump.c
> index 51a2116515..bdb0bfa0e7 100644
> --- a/target/s390x/arch_dump.c
> +++ b/target/s390x/arch_dump.c
> @@ -448,10 +448,6 @@ int cpu_get_dump_info(ArchDumpInfo *info,
>          info->arch_sections_add_fn = *arch_sections_add;
>          info->arch_sections_write_hdr_fn = *arch_sections_write_hdr;
>          info->arch_sections_write_fn = *arch_sections_write;
> -    } else {
> -        info->arch_sections_add_fn = NULL;
> -        info->arch_sections_write_hdr_fn = NULL;
> -        info->arch_sections_write_fn = NULL;
>      }
>      return 0;
>  }
Marc-André Lureau Nov. 8, 2023, 8:09 a.m. UTC | #2
Hi

On Tue, Nov 7, 2023 at 6:22 PM Janosch Frank <frankja@linux.ibm.com> wrote:
>
> dump_state_prepare() now sets the fucntion pointers to NULL so we only

function

> need to touch them if we're going to use them.
>
> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>

regardless if the previous patch is applied, this patch lgtm

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>

> ---
>  target/s390x/arch_dump.c | 4 ----
>  1 file changed, 4 deletions(-)
>
> diff --git a/target/s390x/arch_dump.c b/target/s390x/arch_dump.c
> index 51a2116515..bdb0bfa0e7 100644
> --- a/target/s390x/arch_dump.c
> +++ b/target/s390x/arch_dump.c
> @@ -448,10 +448,6 @@ int cpu_get_dump_info(ArchDumpInfo *info,
>          info->arch_sections_add_fn = *arch_sections_add;
>          info->arch_sections_write_hdr_fn = *arch_sections_write_hdr;
>          info->arch_sections_write_fn = *arch_sections_write;
> -    } else {
> -        info->arch_sections_add_fn = NULL;
> -        info->arch_sections_write_hdr_fn = NULL;
> -        info->arch_sections_write_fn = NULL;
>      }
>      return 0;
>  }
> --
> 2.34.1
>
>
diff mbox series

Patch

diff --git a/target/s390x/arch_dump.c b/target/s390x/arch_dump.c
index 51a2116515..bdb0bfa0e7 100644
--- a/target/s390x/arch_dump.c
+++ b/target/s390x/arch_dump.c
@@ -448,10 +448,6 @@  int cpu_get_dump_info(ArchDumpInfo *info,
         info->arch_sections_add_fn = *arch_sections_add;
         info->arch_sections_write_hdr_fn = *arch_sections_write_hdr;
         info->arch_sections_write_fn = *arch_sections_write;
-    } else {
-        info->arch_sections_add_fn = NULL;
-        info->arch_sections_write_hdr_fn = NULL;
-        info->arch_sections_write_fn = NULL;
     }
     return 0;
 }