Skip to content

Commit 9e7d122

Browse files
philmdJuan Quintela
authored andcommitted
migration: Don't return for postcopy_send_discard_bm_ram()
postcopy_send_discard_bm_ram() always return zero. Since it can't fail, simplify and do not return anything. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: David Edmondson <david.edmondson@oracle.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
1 parent 739fcc1 commit 9e7d122

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

migration/ram.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2419,14 +2419,12 @@ void ram_postcopy_migrated_memory_release(MigrationState *ms)
24192419
/**
24202420
* postcopy_send_discard_bm_ram: discard a RAMBlock
24212421
*
2422-
* Returns zero on success
2423-
*
24242422
* Callback from postcopy_each_ram_send_discard for each RAMBlock
24252423
*
24262424
* @ms: current migration state
24272425
* @block: RAMBlock to discard
24282426
*/
2429-
static int postcopy_send_discard_bm_ram(MigrationState *ms, RAMBlock *block)
2427+
static void postcopy_send_discard_bm_ram(MigrationState *ms, RAMBlock *block)
24302428
{
24312429
unsigned long end = block->used_length >> TARGET_PAGE_BITS;
24322430
unsigned long current;
@@ -2450,8 +2448,6 @@ static int postcopy_send_discard_bm_ram(MigrationState *ms, RAMBlock *block)
24502448
postcopy_discard_send_range(ms, one, discard_length);
24512449
current = one + discard_length;
24522450
}
2453-
2454-
return 0;
24552451
}
24562452

24572453
static void postcopy_chunk_hostpages_pass(MigrationState *ms, RAMBlock *block);

0 commit comments

Comments
 (0)