On Mon, Feb 02, 2026 at 07:40:59PM -0300, Fabiano Rosas wrote:
> Remove migrate_params_apply so the logic of setting migration
> parameters is all in one spot.
> 
> Suggested-by: Prasad Pandit <[email protected]>
> Signed-off-by: Fabiano Rosas <[email protected]>
> ---
>  migration/options.c | 33 ++++++++++++++-------------------
>  1 file changed, 14 insertions(+), 19 deletions(-)
> 
> diff --git a/migration/options.c b/migration/options.c
> index 180ebed51c..733aae51a8 100644
> --- a/migration/options.c
> +++ b/migration/options.c
> @@ -1266,25 +1266,11 @@ bool migrate_params_check(MigrationParameters 
> *params, Error **errp)
>      return true;
>  }
>  
> -static void migrate_params_apply(MigrationParameters *params)
> -{
> -    MigrationState *s = migrate_get_current();
> -    MigrationParameters *cur = &s->parameters;
> -
> -    migrate_tls_opts_free(cur);
> -    qapi_free_BitmapMigrationNodeAliasList(cur->block_bitmap_mapping);
> -    qapi_free_strList(cur->cpr_exec_command);
> -
> -    /* mark all present, so they're all copied */
> -    migrate_mark_all_params_present(params);
> -    QAPI_CLONE_MEMBERS(MigrationParameters, cur, params);
> -}

I actually like these smaller functions when their name can represent what
it does (so I read less but know what it is doing faster)..  But yeah if
both of you like to drop it, I'm OK.

Reviewed-by: Peter Xu <[email protected]>

-- 
Peter Xu


Reply via email to