[PATCH] migration/dirtyrate: Remove an extra parameter

Wafer posted 1 patch 11 months, 4 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20231204012230.4123-1-wafer@jaguarmicro.com
Maintainers: Hyman Huang <yong.huang@smartx.com>, Juan Quintela <quintela@redhat.com>, Peter Xu <peterx@redhat.com>, Fabiano Rosas <farosas@suse.de>, Leonardo Bras <leobras@redhat.com>
migration/dirtyrate.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
[PATCH] migration/dirtyrate: Remove an extra parameter
Posted by Wafer 11 months, 4 weeks ago
vcpu_dirty_stat_collect() has an unused parameter so remove it.

Signed-off-by: Wafer <wafer@jaguarmicro.com>
---
 migration/dirtyrate.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/migration/dirtyrate.c b/migration/dirtyrate.c
index 036ac017fc..62d86b8be2 100644
--- a/migration/dirtyrate.c
+++ b/migration/dirtyrate.c
@@ -129,8 +129,7 @@ static DirtyPageRecord *vcpu_dirty_stat_alloc(VcpuStat *stat)
     return g_new0(DirtyPageRecord, nvcpu);
 }
 
-static void vcpu_dirty_stat_collect(VcpuStat *stat,
-                                    DirtyPageRecord *records,
+static void vcpu_dirty_stat_collect(DirtyPageRecord *records,
                                     bool start)
 {
     CPUState *cpu;
@@ -158,7 +157,7 @@ retry:
     WITH_QEMU_LOCK_GUARD(&qemu_cpu_list_lock) {
         gen_id = cpu_list_generation_id_get();
         records = vcpu_dirty_stat_alloc(stat);
-        vcpu_dirty_stat_collect(stat, records, true);
+        vcpu_dirty_stat_collect(records, true);
     }
 
     duration = dirty_stat_wait(calc_time_ms, init_time_ms);
@@ -172,7 +171,7 @@ retry:
             cpu_list_unlock();
             goto retry;
         }
-        vcpu_dirty_stat_collect(stat, records, false);
+        vcpu_dirty_stat_collect(records, false);
     }
 
     for (i = 0; i < stat->nvcpu; i++) {
-- 
2.27.0
Re: [PATCH] migration/dirtyrate: Remove an extra parameter
Posted by Yong Huang 11 months, 4 weeks ago
On Mon, Dec 4, 2023 at 9:23 AM Wafer <wafer@jaguarmicro.com> wrote:

> vcpu_dirty_stat_collect() has an unused parameter so remove it.
>
> Signed-off-by: Wafer <wafer@jaguarmicro.com>
> ---
>  migration/dirtyrate.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/migration/dirtyrate.c b/migration/dirtyrate.c
> index 036ac017fc..62d86b8be2 100644
> --- a/migration/dirtyrate.c
> +++ b/migration/dirtyrate.c
> @@ -129,8 +129,7 @@ static DirtyPageRecord *vcpu_dirty_stat_alloc(VcpuStat
> *stat)
>      return g_new0(DirtyPageRecord, nvcpu);
>  }
>
> -static void vcpu_dirty_stat_collect(VcpuStat *stat,
> -                                    DirtyPageRecord *records,
> +static void vcpu_dirty_stat_collect(DirtyPageRecord *records,
>                                      bool start)
>  {
>      CPUState *cpu;
> @@ -158,7 +157,7 @@ retry:
>      WITH_QEMU_LOCK_GUARD(&qemu_cpu_list_lock) {
>          gen_id = cpu_list_generation_id_get();
>          records = vcpu_dirty_stat_alloc(stat);
> -        vcpu_dirty_stat_collect(stat, records, true);
> +        vcpu_dirty_stat_collect(records, true);
>      }
>
>      duration = dirty_stat_wait(calc_time_ms, init_time_ms);
> @@ -172,7 +171,7 @@ retry:
>              cpu_list_unlock();
>              goto retry;
>          }
> -        vcpu_dirty_stat_collect(stat, records, false);
> +        vcpu_dirty_stat_collect(records, false);
>      }
>
>      for (i = 0; i < stat->nvcpu; i++) {
> --
> 2.27.0
>
>
Reviewed-by: Hyman Huang <yong.huang@smartx.com>

Thanks

-- 
Best regards