libxc: use bitmap_alloc
PATCH 1/1 libxc: use bitmap_alloc
Use existing helper to allocate a bitmap.
Signed-off-by Olaf Hering <[email protected]>
--- tools/libxc/xc_sr_save.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/libxc/xc_sr_save.c +1 -1
@@ -809,7 +809,7 @@ static int setup(struct xc_sr_context *ctx) xch, dirty_bitmap, NRPAGES(bitmap_size(ctx->save.p2m_size))); ctx->save.batch_pfns =malloc (MAX_BATCH_SIZE *sizeof (*ctx->save.batch_pfns)); - ctx->save.deferred_pages =calloc (1 ,bitmap_size (ctx->save.p2m_size)); + ctx->save.deferred_pages =bitmap_alloc (ctx->save.p2m_size);if ( !ctx->save.batch_pfns || !dirty_bitmap || !ctx->save.deferred_pages ) {
Quoted 3 lines · Olaf Hering
Use existing helper to allocate a bitmap.
Signed-off-by Olaf Hering <[email protected]>
Reviewed-by Andrew Cooper <[email protected]>
Wei Liu
Acked-byQuoted 6 lines · Andrew Cooper
Quoted 3 lines · Olaf Hering
Use existing helper to allocate a bitmap.
Signed-off-by Olaf Hering <[email protected]>Reviewed-by Andrew Cooper <[email protected]>
Acked-by Wei Liu <[email protected]>
I've rebased pushed this patch to staging to save another round of posting. Please check if there is any issue.
Wei.