Revision | dc57d6f2ec3eb9ba6d8a6cac735bf6d02017dda2 (tree) |
---|---|
Time | 2022-01-28 23:38:23 |
Author | Peter Xu <peterx@redh...> |
Commiter | Juan Quintela |
migration: Don't return for postcopy_chunk_hostpages()
It always return zero, because it just can't go wrong so far. Simplify the
code with no functional change.
Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
@@ -2566,12 +2566,10 @@ static void postcopy_chunk_hostpages_pass(MigrationState *ms, RAMBlock *block) | ||
2566 | 2566 | * dirty host-page size chunks as all dirty. In this case the host-page |
2567 | 2567 | * is the host-page for the particular RAMBlock, i.e. it might be a huge page |
2568 | 2568 | * |
2569 | - * Returns zero on success | |
2570 | - * | |
2571 | 2569 | * @ms: current migration state |
2572 | 2570 | * @block: block we want to work with |
2573 | 2571 | */ |
2574 | -static int postcopy_chunk_hostpages(MigrationState *ms, RAMBlock *block) | |
2572 | +static void postcopy_chunk_hostpages(MigrationState *ms, RAMBlock *block) | |
2575 | 2573 | { |
2576 | 2574 | postcopy_discard_send_init(ms, block->idstr); |
2577 | 2575 |
@@ -2581,7 +2579,6 @@ static int postcopy_chunk_hostpages(MigrationState *ms, RAMBlock *block) | ||
2581 | 2579 | postcopy_chunk_hostpages_pass(ms, block); |
2582 | 2580 | |
2583 | 2581 | postcopy_discard_send_finish(ms); |
2584 | - return 0; | |
2585 | 2582 | } |
2586 | 2583 | |
2587 | 2584 | /** |
@@ -2603,7 +2600,6 @@ int ram_postcopy_send_discard_bitmap(MigrationState *ms) | ||
2603 | 2600 | { |
2604 | 2601 | RAMState *rs = ram_state; |
2605 | 2602 | RAMBlock *block; |
2606 | - int ret; | |
2607 | 2603 | |
2608 | 2604 | RCU_READ_LOCK_GUARD(); |
2609 | 2605 |
@@ -2617,10 +2613,7 @@ int ram_postcopy_send_discard_bitmap(MigrationState *ms) | ||
2617 | 2613 | |
2618 | 2614 | RAMBLOCK_FOREACH_NOT_IGNORED(block) { |
2619 | 2615 | /* Deal with TPS != HPS and huge pages */ |
2620 | - ret = postcopy_chunk_hostpages(ms, block); | |
2621 | - if (ret) { | |
2622 | - return ret; | |
2623 | - } | |
2616 | + postcopy_chunk_hostpages(ms, block); | |
2624 | 2617 | } |
2625 | 2618 | trace_ram_postcopy_send_discard_bitmap(); |
2626 | 2619 |