From patchwork Tue Sep 10 22:15:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 827055 Delivered-To: patch@linaro.org Received: by 2002:adf:ab1c:0:b0:367:895a:4699 with SMTP id q28csp529030wrc; Tue, 10 Sep 2024 15:18:12 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVmYJ6Fldi1bSsC1LbFa7yeibaJfA1mJsfS+M9DrmEJ8gqyG//+IVP9o2X42lMrilEk4Qqfkw==@linaro.org X-Google-Smtp-Source: AGHT+IFxyZ+sB2uG92YxqbgTlHM3zltLjCm6B40C7p1hEKGXrw6oYort7gUo1bhhybYlJEn0KDCS X-Received: by 2002:a05:620a:28d5:b0:79d:6d7d:e5b3 with SMTP id af79cd13be357-7a9d3d3ac23mr157699285a.42.1726006692098; Tue, 10 Sep 2024 15:18:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726006692; cv=none; d=google.com; s=arc-20240605; b=GWOqlUjHDIH+pcf/QYZtBjzsLie6txouZIbbxHDXz9dV5nO1m3b1TFAuhbOSj/8Mm4 9MIcu1W0Zlmw+1fIJJGlVN132l2V6iDWaJ6HRzzJPQ22ShkXnck+8DP1PsZmeYYcNlZ3 y39XdsA4gjYwOV9TrHERcTfnump89zOsQa0J1k1C/gqmSfaOpcW19x//c1xV/P6jM3er iNiX1tl9w29bM65nTE131womctDgBohxOticBTa4p8w4LEdX5gUjvhMcOCL3DYbPGFZT BGTKhsHxzooDOySZrszNKckBLqmxW3EA5tzoADjjj+ZND8Han5IyqE24a2OIJpMqjaVL FdLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=gSYhajPs2VsIZSUZF9nxgEDV+zkDqTYhjuMBxS8/VrA=; fh=ynTlK/oH/ur5RqvPhczOwhj4YatH1hTHyPq9uMdf314=; b=OUU1rLAL4QuyHvIxE5/jr0Nyg0VrUAxW/UxsCEQsRknDz+SyJ2eHubpK48RnuF3uY5 H0yE1DEVbYlhZpuSaDGl3AaqjiaTXIGE2kiMYq30xzcTKC8ZIiT6P7qUKAWL4PMA7Bgo l+3xrgnMKoM8ztEErEMN3cB/635Nd0tkBKL4a3nx3OXRrHt6MXiagpaBsSeccpiC0LIY phh3xunDYvb7jiwwvyR658nKygBWJgvOtBzeVvL2bdAOupnnjNqXqwL43UANWkDGP4Wv AmKohZXvzO+7+EHDxC6D1XMw/yAm0b8gcGuIPg9PlCpj96B0RHIPI1OfD26udnlbVd5g Co7Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=T5DrU0Qb; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7a9a79ef800si867280785a.158.2024.09.10.15.18.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Sep 2024 15:18:12 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=T5DrU0Qb; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1so9Am-000349-8M; Tue, 10 Sep 2024 18:17:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1so9A3-0007XJ-52 for qemu-devel@nongnu.org; Tue, 10 Sep 2024 18:16:36 -0400 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1so99z-0006Zw-J7 for qemu-devel@nongnu.org; Tue, 10 Sep 2024 18:16:34 -0400 Received: by mail-pg1-x533.google.com with SMTP id 41be03b00d2f7-7dafd9df795so1101993a12.1 for ; Tue, 10 Sep 2024 15:16:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1726006589; x=1726611389; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gSYhajPs2VsIZSUZF9nxgEDV+zkDqTYhjuMBxS8/VrA=; b=T5DrU0QbHttzqM+QYPxAuuVUkakCPqhSPQJ/u2L/vHMZeZmpKLXQ0IY0d7lHvjHVDQ j6FpHdZsqe8deaXtHx15Hcx2CqYC/H6aXFEdevV/foJvQL4qSD0ipeZ7+8THNaVFZcv0 ZBMNg2f3T4c4X5wi5DQDNEhU7/JwvRyRCzU8/CLnYlUtbQjr+SHCyoIrmebJinX7JQbe 7PHml71ogv5pFgikir50cVcQS2KXHLhlAXJRUaSteQz9/FkXLKLgFgjA8AJ26KzhTnnB L3VXsWtcNts7KjMMTsWSDuWdcnfa2b0CqJx5cE95xrzlw3n5cs3pmBqgF8e89JE1yiGu owtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726006589; x=1726611389; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gSYhajPs2VsIZSUZF9nxgEDV+zkDqTYhjuMBxS8/VrA=; b=rNfh99TIFhvUiD3kQDsGBJj3mysajUiqge+f/cdf8e2nwI7Abo56rRQTTAVhqReXTR LGOn4Ds3kedMUpFwZVVwMoWULepxy30tYiXFD+9ndZLGFHJ4U2+mZpb9qHOZI/vV0ait 8iSaP8+M3m9ECjbs7vSGnzDaQJQ5e2Q9f25vY8gDl55zY6jKXMJZ+xzPzg5lzbMw+v8j upT/oYEVj3Wg5prxJOq+H2ISt4i49CmLgcNwhH6ls7b1MHDvDTEGGWoxj8w5faQO6yOV tVWfb/veO82rC/HmhYfNZCv5h2rDKRCUBhzjyY1mhltpqJnsKSrmun6hOriRpsOMUHVK HMRA== X-Gm-Message-State: AOJu0YyNBQap2/8jD+DjzqaeLM4+7GO9q8xuARSLMTnWpTUs4V6DpR7o 6msCLwL2eRJH6buAPa+AUDZZdvjrBb8dF/cJbU5zQ5XTsjf9E6nYXgsuQB5kjVjXy7hXv25I8WB BHGOfnr38 X-Received: by 2002:a05:6a20:c703:b0:1cf:2357:df1a with SMTP id adf61e73a8af0-1cf62c8d808mr1658573637.10.1726006589396; Tue, 10 Sep 2024 15:16:29 -0700 (PDT) Received: from linaro.vn.shawcable.net ([2604:3d08:9384:1d00::9633]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71909003d0esm1884055b3a.93.2024.09.10.15.16.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2024 15:16:28 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Zhao Liu , "Richard W.M. Jones" , Joel Stanley , Kevin Wolf , Paolo Bonzini , qemu-arm@nongnu.org, Corey Minyard , Eric Farman , Thomas Huth , Keith Busch , WANG Xuerui , Hyman Huang , Stefan Berger , Michael Rolnik , Alistair Francis , =?utf-8?q?Marc-Andr=C3=A9_Lure?= =?utf-8?q?au?= , Markus Armbruster , Sriram Yagnaraman , Palmer Dabbelt , qemu-riscv@nongnu.org, Ani Sinha , Halil Pasic , Jesper Devantier , Laurent Vivier , Peter Maydell , Igor Mammedov , kvm@vger.kernel.org, =?utf-8?q?Alex_Be?= =?utf-8?q?nn=C3=A9e?= , Richard Henderson , Fam Zheng , qemu-s390x@nongnu.org, Hanna Reitz , Nicholas Piggin , Eduardo Habkost , Laurent Vivier , Rob Herring , Marcel Apfelbaum , qemu-block@nongnu.org, "Maciej S. Szmigiero" , qemu-ppc@nongnu.org, Daniel Henrique Barboza , Christian Borntraeger , Harsh Prateek Bora , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Nina Schoetterl-Glausch , "Michael S. Tsirkin" , Fabiano Rosas , Helge Deller , Dmitry Fleytman , Daniel Henrique Barboza , Akihiko Odaki , Marcelo Tosatti , David Gibson , Aurelien Jarno , Liu Zhiwei , Yanan Wang , Peter Xu , Bin Meng , Weiwei Li , Klaus Jensen , Jean-Christophe Dubois , Jason Wang , Pierrick Bouvier Subject: [PATCH 08/39] migration: replace assert(0) with g_assert_not_reached() Date: Tue, 10 Sep 2024 15:15:35 -0700 Message-Id: <20240910221606.1817478-9-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240910221606.1817478-1-pierrick.bouvier@linaro.org> References: <20240910221606.1817478-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::533; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pg1-x533.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Signed-off-by: Pierrick Bouvier Reviewed-by: Fabiano Rosas Reviewed-by: Richard Henderson Reviewed-by: Peter Xu --- migration/migration-hmp-cmds.c | 2 +- migration/postcopy-ram.c | 14 +++++++------- migration/ram.c | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/migration/migration-hmp-cmds.c b/migration/migration-hmp-cmds.c index 7d608d26e19..e6e96aa6288 100644 --- a/migration/migration-hmp-cmds.c +++ b/migration/migration-hmp-cmds.c @@ -636,7 +636,7 @@ void hmp_migrate_set_parameter(Monitor *mon, const QDict *qdict) visit_type_bool(v, param, &p->direct_io, &err); break; default: - assert(0); + g_assert_not_reached(); } if (err) { diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c index 1c374b7ea1e..f431bbc0d4f 100644 --- a/migration/postcopy-ram.c +++ b/migration/postcopy-ram.c @@ -1411,40 +1411,40 @@ int postcopy_ram_incoming_init(MigrationIncomingState *mis) int postcopy_ram_incoming_cleanup(MigrationIncomingState *mis) { - assert(0); + g_assert_not_reached(); return -1; } int postcopy_ram_prepare_discard(MigrationIncomingState *mis) { - assert(0); + g_assert_not_reached(); return -1; } int postcopy_request_shared_page(struct PostCopyFD *pcfd, RAMBlock *rb, uint64_t client_addr, uint64_t rb_offset) { - assert(0); + g_assert_not_reached(); return -1; } int postcopy_ram_incoming_setup(MigrationIncomingState *mis) { - assert(0); + g_assert_not_reached(); return -1; } int postcopy_place_page(MigrationIncomingState *mis, void *host, void *from, RAMBlock *rb) { - assert(0); + g_assert_not_reached(); return -1; } int postcopy_place_page_zero(MigrationIncomingState *mis, void *host, RAMBlock *rb) { - assert(0); + g_assert_not_reached(); return -1; } @@ -1452,7 +1452,7 @@ int postcopy_wake_shared(struct PostCopyFD *pcfd, uint64_t client_addr, RAMBlock *rb) { - assert(0); + g_assert_not_reached(); return -1; } #endif diff --git a/migration/ram.c b/migration/ram.c index 67ca3d5d51a..0aa5d347439 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -1765,19 +1765,19 @@ bool ram_write_tracking_available(void) bool ram_write_tracking_compatible(void) { - assert(0); + g_assert_not_reached(); return false; } int ram_write_tracking_start(void) { - assert(0); + g_assert_not_reached(); return -1; } void ram_write_tracking_stop(void) { - assert(0); + g_assert_not_reached(); } #endif /* defined(__linux__) */