From 8b9407a09f925ff9e4dcf6783add8df68f5c7eb6 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 2 Feb 2021 15:17:32 +0100 Subject: migration: Clean up signed vs. unsigned XBZRLE cache-size 73af8dd8d7 "migration: Make xbzrle_cache_size a migration parameter" (v2.11.0) made the new parameter unsigned (QAPI type 'size', uint64_t in C). It neglected to update existing code, which continues to use int64_t. migrate_xbzrle_cache_size() returns the new parameter. Adjust its return type. QMP query-migrate-cache-size returns migrate_xbzrle_cache_size(). Adjust its return type. migrate-set-parameters passes the new parameter to xbzrle_cache_resize(). Adjust its parameter type. xbzrle_cache_resize() passes it on to cache_init(). Adjust its parameter type. Signed-off-by: Markus Armbruster Reviewed-by: Dr. David Alan Gilbert Message-Id: <20210202141734.2488076-3-armbru@redhat.com> Signed-off-by: Dr. David Alan Gilbert --- migration/ram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'migration/ram.c') diff --git a/migration/ram.c b/migration/ram.c index 26adb55aa9..46e9d4d145 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -131,7 +131,7 @@ static void XBZRLE_cache_unlock(void) * @new_size: new cache size * @errp: set *errp if the check failed, with reason */ -int xbzrle_cache_resize(int64_t new_size, Error **errp) +int xbzrle_cache_resize(uint64_t new_size, Error **errp) { PageCache *new_cache; int64_t ret = 0; -- cgit v1.2.3