修訂 | 9e7d1223ace8c1182e362de8894ebe8d111c8918 (tree) |
---|---|
時間 | 2022-01-28 23:38:23 |
作者 | Philippe Mathieu-Daudé <philmd@redh...> |
Commiter | Juan Quintela |
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>
@@ -2419,14 +2419,12 @@ void ram_postcopy_migrated_memory_release(MigrationState *ms) | ||
2419 | 2419 | /** |
2420 | 2420 | * postcopy_send_discard_bm_ram: discard a RAMBlock |
2421 | 2421 | * |
2422 | - * Returns zero on success | |
2423 | - * | |
2424 | 2422 | * Callback from postcopy_each_ram_send_discard for each RAMBlock |
2425 | 2423 | * |
2426 | 2424 | * @ms: current migration state |
2427 | 2425 | * @block: RAMBlock to discard |
2428 | 2426 | */ |
2429 | -static int postcopy_send_discard_bm_ram(MigrationState *ms, RAMBlock *block) | |
2427 | +static void postcopy_send_discard_bm_ram(MigrationState *ms, RAMBlock *block) | |
2430 | 2428 | { |
2431 | 2429 | unsigned long end = block->used_length >> TARGET_PAGE_BITS; |
2432 | 2430 | unsigned long current; |
@@ -2450,8 +2448,6 @@ static int postcopy_send_discard_bm_ram(MigrationState *ms, RAMBlock *block) | ||
2450 | 2448 | postcopy_discard_send_range(ms, one, discard_length); |
2451 | 2449 | current = one + discard_length; |
2452 | 2450 | } |
2453 | - | |
2454 | - return 0; | |
2455 | 2451 | } |
2456 | 2452 | |
2457 | 2453 | static void postcopy_chunk_hostpages_pass(MigrationState *ms, RAMBlock *block); |