From nobody Sun May 19 13:07:52 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1640880331; cv=none; d=zohomail.com; s=zohoarc; b=YCmUBJaCvvYkhAr5jdti3HFE3dV7900xYsyGyk4iqMAGUJ1x8Dur9DxMw7THnAB3kgnfzYP92NGehrtSeoLLLHd/lsBT+9LRGnjbJ+pKgQh6ae70DRPHPw9rM1xB+GXgDD0YFPQFSklwBzCnO4ydkF/Ebqt2UI3bbOkb6RtD53k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1640880331; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Subject:To; bh=JMOfaJ/LMhDSs430s4HqaNJL/fJKyjqZbj2wrNrE+Yg=; b=TdPqgdtgouEE+AmRXqy4uqDA7IMS5SflAjt/3gRkQxOPufn1Hs/1G47e+nS+lsIRQe0S+103AyLKnlvB9yHT26bAe1tP7o0DqI3A9WWTHexy8iMMCv1QpWBnrjKBvWvYRVvbSB2SIFO9qWqKtJzOZqkC9LxM6qwRce6FIrAq/cg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1640880331365793.0636167830033; Thu, 30 Dec 2021 08:05:31 -0800 (PST) Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-643-8uJbtplRMRmXja_VyMUJrw-1; Thu, 30 Dec 2021 11:05:29 -0500 Received: by mail-wm1-f71.google.com with SMTP id az11-20020a05600c600b00b00345c4309bccso7082460wmb.5 for ; Thu, 30 Dec 2021 08:05:29 -0800 (PST) Return-Path: Return-Path: Received: from x1w.. (26.red-83-50-86.dynamicip.rima-tde.net. [83.50.86.26]) by smtp.gmail.com with ESMTPSA id y1sm23930187wrm.3.2021.12.30.08.05.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Dec 2021 08:05:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640880330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JMOfaJ/LMhDSs430s4HqaNJL/fJKyjqZbj2wrNrE+Yg=; b=Gk/kCMl0AQOqpgw4vGDGK3RNQui0WVnLpM8hOfYmMPOVBTqUUCS3Jw0OcjlP3MzDUf5UfO vAlQjpFX2H8G6xR1jZp108vMaLKptJK5bhUyP+4W8sFbnhtbHlM0l0EE0w7x6LvtVLnQ2X uvck8cKJ04ZemDcx/DMlAVm82ThVck0= X-MC-Unique: 8uJbtplRMRmXja_VyMUJrw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=JMOfaJ/LMhDSs430s4HqaNJL/fJKyjqZbj2wrNrE+Yg=; b=1ycWogOc5FK4NdTTAQhMA/NqHqxMOleSUgP+YymZzIPGs/7xIMuvEao+uQ/QWbYsyR K6hb2dEvA5mcCre0bTvw35o7RcQN6GweZ6l5HH6bZ+75VGb0o6Cz5y3BqWf5LgEqbQUr 5Q/x0SyBtdNi6u1iQKVDfdezfYVX+WC8pLLneLoBnOvdSADQwzGzsR2zNakdNq32xTej A7Ths1DDjcKYNUapRP6PAA7Dk7KCah61LZY3W2szErFBDngs2aJkf/NydmnZBp2E0xvj C/C7rTycEvKTEc5deJn4h+ivP6D/NRMqIo2iqm05E8Of8HmOzxeO1RoNU3ItA/oMQbWU L7Tw== X-Gm-Message-State: AOAM532GC+7wp5YbzQl1zBXfkcTyC/V6Wezx1JsTCYZhJXnIWeZZ8T8z U5wgrfe8Fi4Smlz2lQXnoWfgupnl2QY+iWLq8TC7kLqrMIKf1hC71FYHtNhJne/A2Xz7JK5jUT2 J3akILdQWXyTRKQ== X-Received: by 2002:a5d:440e:: with SMTP id z14mr3756650wrq.611.1640880328145; Thu, 30 Dec 2021 08:05:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJxUMOda5qjaqTE+68qVvqb0A8MMGWgi4qK9A96jnG8eYpl7UNIBsyvnQXlILYYobsH3S+Ihlg== X-Received: by 2002:a5d:440e:: with SMTP id z14mr3756636wrq.611.1640880328016; Thu, 30 Dec 2021 08:05:28 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Juan Quintela , "Dr. David Alan Gilbert" , David Edmondson , Peter Xu , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH] migration: Don't return for postcopy_send_discard_bm_ram() Date: Thu, 30 Dec 2021 17:05:25 +0100 Message-Id: <20211230160525.462185-1-philmd@redhat.com> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1640880333831000001 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=C3=A9 Reviewed-by: David Edmondson Reviewed-by: Juan Quintela --- Based-on: <20211224065000.97572-1-peterx@redhat.com> --- migration/ram.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 5234d1ece11..e241ce98461 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -2433,14 +2433,12 @@ void ram_postcopy_migrated_memory_release(Migration= State *ms) /** * postcopy_send_discard_bm_ram: discard a RAMBlock * - * Returns zero on success - * * Callback from postcopy_each_ram_send_discard for each RAMBlock * * @ms: current migration state * @block: RAMBlock to discard */ -static int postcopy_send_discard_bm_ram(MigrationState *ms, RAMBlock *bloc= k) +static void postcopy_send_discard_bm_ram(MigrationState *ms, RAMBlock *blo= ck) { unsigned long end =3D block->used_length >> TARGET_PAGE_BITS; unsigned long current; @@ -2464,8 +2462,6 @@ static int postcopy_send_discard_bm_ram(MigrationStat= e *ms, RAMBlock *block) postcopy_discard_send_range(ms, one, discard_length); current =3D one + discard_length; } - - return 0; } =20 static void postcopy_chunk_hostpages_pass(MigrationState *ms, RAMBlock *bl= ock); --=20 2.33.1