• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisiondc57d6f2ec3eb9ba6d8a6cac735bf6d02017dda2 (tree)
Time2022-01-28 23:38:23
AuthorPeter Xu <peterx@redh...>
CommiterJuan Quintela

Log Message

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>

Change Summary

Incremental Difference

--- a/migration/ram.c
+++ b/migration/ram.c
@@ -2566,12 +2566,10 @@ static void postcopy_chunk_hostpages_pass(MigrationState *ms, RAMBlock *block)
25662566 * dirty host-page size chunks as all dirty. In this case the host-page
25672567 * is the host-page for the particular RAMBlock, i.e. it might be a huge page
25682568 *
2569- * Returns zero on success
2570- *
25712569 * @ms: current migration state
25722570 * @block: block we want to work with
25732571 */
2574-static int postcopy_chunk_hostpages(MigrationState *ms, RAMBlock *block)
2572+static void postcopy_chunk_hostpages(MigrationState *ms, RAMBlock *block)
25752573 {
25762574 postcopy_discard_send_init(ms, block->idstr);
25772575
@@ -2581,7 +2579,6 @@ static int postcopy_chunk_hostpages(MigrationState *ms, RAMBlock *block)
25812579 postcopy_chunk_hostpages_pass(ms, block);
25822580
25832581 postcopy_discard_send_finish(ms);
2584- return 0;
25852582 }
25862583
25872584 /**
@@ -2603,7 +2600,6 @@ int ram_postcopy_send_discard_bitmap(MigrationState *ms)
26032600 {
26042601 RAMState *rs = ram_state;
26052602 RAMBlock *block;
2606- int ret;
26072603
26082604 RCU_READ_LOCK_GUARD();
26092605
@@ -2617,10 +2613,7 @@ int ram_postcopy_send_discard_bitmap(MigrationState *ms)
26172613
26182614 RAMBLOCK_FOREACH_NOT_IGNORED(block) {
26192615 /* 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);
26242617 }
26252618 trace_ram_postcopy_send_discard_bitmap();
26262619