From nobody Sun Nov 24 09:58:31 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1726126886; cv=none; d=zohomail.com; s=zohoarc; b=KPj1/K7qIkmsHIB9OR61ZLSyc41uJehFmHWeDsh8Z2GYyEcGXEzqoPLvbEuTfvVWOt0ruELh2xcYkcB2k6Tdsk5oYQMx99FzUNL3+Voe4TxHldNyjMAPPIQUSluN6mJ6tZqZS+mzszuBHKRwf8fr7URkDCHhw4dIkGRi9qqKBrU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1726126886; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=KmOJONIVi8Rgmcdj3MpwvRz35OjK70IjJaXWHbl2cKY=; b=N0ToBYYdoymnvlnWWEDreDTEWJY2Hy27ypB6tL4DGPJ1kn1DNQG9Vl4qZB+MS+Aa8tzxARu9TEj0YxdtU3KiLjgI6hSGaEOVTzRRbd7Jp+k16ZA/2dyzvVykQqdf0IwFDmaqsrLBTcJbxdOe1FiY1PVaXaK9wdnfobAIcJhsXwA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1726126886420270.6189653223622; Thu, 12 Sep 2024 00:41:26 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1soeRU-0005AK-D7; Thu, 12 Sep 2024 03:40:40 -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 1soeQl-0002BP-0P for qemu-devel@nongnu.org; Thu, 12 Sep 2024 03:39:55 -0400 Received: from mail-oi1-x22e.google.com ([2607:f8b0:4864:20::22e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1soeQe-0000ER-IJ for qemu-devel@nongnu.org; Thu, 12 Sep 2024 03:39:54 -0400 Received: by mail-oi1-x22e.google.com with SMTP id 5614622812f47-3e040388737so300108b6e.3 for ; Thu, 12 Sep 2024 00:39:48 -0700 (PDT) Received: from linaro.vn.shawcable.net ([2604:3d08:9384:1d00::9633]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7db1fb9ad87sm983458a12.6.2024.09.12.00.39.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Sep 2024 00:39:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1726126787; x=1726731587; 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=KmOJONIVi8Rgmcdj3MpwvRz35OjK70IjJaXWHbl2cKY=; b=Wzkrxp2elJ6iQeto3HBj9Oo1SDdFyst1QgX++um+k4aXirrYQc+L5BNsyxnD1NMnLn TvAjM1/2KLTkh1SZ5wbvdssIx+y/9+LUU5f5ZK8hQlhFKY6IFuHwbSq3Yc83ljRBWivJ N84Yy+Jxm3lbKb1y0sdoFA36i0lBug61xRrVI9AV88rvRj4fajCm4/RdHVx9K710Stz/ ns1GFqqKVPTiCu/jc4JzYjK4xsm5JAcvlZ1ishsXOMFxORUegqWptElDz/MYRDnn5ql3 JKwt5M/X2xdLFM9aNCfiWiGIOeCwKkOxdp8I41jJ49NoV2YbTc9mznezT8dDlabmB8ML KMQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726126787; x=1726731587; 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=KmOJONIVi8Rgmcdj3MpwvRz35OjK70IjJaXWHbl2cKY=; b=vkpnPB8ZuS/AVVM+fhcLGxrSNL/S6p8xH/4Ln8ndDV9Yy+PCz7u4LiQNQCUEQGclGF 6jETZR3Kt22P5hamqI62qCTCd8dysgykKFIorxyGE02AiME7KHPvyQl27N7ptUL9Kq4j PYAhSuMiIXoKLtkN04zcrHqyIXllaQA5qgedu26tpEB3AeeCUbqdbntyCJwgaYN/qfEt gScHh4krxQKQeHdIJXRGZWmKEcHGRuZAyj1tTXgZiWo/KVGuR+5Y73i3K6lnTp8jOAr+ 9wDymdx0HXjKU96XYRwVzNsRauCe6/WsikBIgcJ+c72i0uWaUcJk7Oy7qKWCwF2nbq2y DVyA== X-Gm-Message-State: AOJu0Yx1or+Dd24fOy44iXL4sgBHYhe/3cMdHm0FsFN3ITgpfHufBwsj N/X5KMp6HnyYHSmqp0c2jFfkUVe7aot8y5/bcEWfwU8Wqd1LELwGTrTvsBzhWSXg+Ix3acyPhSK gAL327j9O X-Google-Smtp-Source: AGHT+IHQmwwOBmli4W+UYIBuLgmtdhnhoMM/mefW6Mu1WXJhmB0TUFR0xhKaZNkIkcZOjB8bVSAq8A== X-Received: by 2002:a05:6808:309a:b0:3dd:3d77:2774 with SMTP id 5614622812f47-3e071b29035mr1047445b6e.43.1726126787067; Thu, 12 Sep 2024 00:39:47 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Jason Wang , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Laurent Vivier , Marcelo Tosatti , Nicholas Piggin , Klaus Jensen , WANG Xuerui , Halil Pasic , Rob Herring , Michael Rolnik , Zhao Liu , Peter Maydell , Richard Henderson , Fabiano Rosas , Corey Minyard , Keith Busch , Thomas Huth , "Maciej S. Szmigiero" , Harsh Prateek Bora , Kevin Wolf , Paolo Bonzini , Jesper Devantier , Hyman Huang , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Palmer Dabbelt , qemu-s390x@nongnu.org, Laurent Vivier , qemu-riscv@nongnu.org, "Richard W.M. Jones" , Liu Zhiwei , Aurelien Jarno , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Marcel Apfelbaum , kvm@vger.kernel.org, Christian Borntraeger , Akihiko Odaki , Daniel Henrique Barboza , Hanna Reitz , Ani Sinha , qemu-ppc@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Alistair Francis , Bin Meng , "Michael S. Tsirkin" , Helge Deller , Peter Xu , Daniel Henrique Barboza , Dmitry Fleytman , Nina Schoetterl-Glausch , Yanan Wang , qemu-arm@nongnu.org, Igor Mammedov , Jean-Christophe Dubois , Eric Farman , Sriram Yagnaraman , qemu-block@nongnu.org, Stefan Berger , Joel Stanley , Eduardo Habkost , David Gibson , Fam Zheng , Weiwei Li , Markus Armbruster , Pierrick Bouvier Subject: [PATCH v2 08/48] migration: replace assert(0) with g_assert_not_reached() Date: Thu, 12 Sep 2024 00:38:41 -0700 Message-Id: <20240912073921.453203-9-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240912073921.453203-1-pierrick.bouvier@linaro.org> References: <20240912073921.453203-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::22e; envelope-from=pierrick.bouvier@linaro.org; helo=mail-oi1-x22e.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1726126888253116600 Content-Type: text/plain; charset="utf-8" This patch is part of a series that moves towards a consistent use of g_assert_not_reached() rather than an ad hoc mix of different assertion mechanisms. Reviewed-by: Fabiano Rosas Reviewed-by: Peter Xu Signed-off-by: Pierrick Bouvier --- 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 28165cfc9ed..20d1a6e2194 100644 --- a/migration/migration-hmp-cmds.c +++ b/migration/migration-hmp-cmds.c @@ -640,7 +640,7 @@ void hmp_migrate_set_parameter(Monitor *mon, const QDic= t *qdict) visit_type_bool(v, param, &p->direct_io, &err); break; default: - assert(0); + g_assert_not_reached(); } =20 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(MigrationIncomingSta= te *mis) =20 int postcopy_ram_incoming_cleanup(MigrationIncomingState *mis) { - assert(0); + g_assert_not_reached(); return -1; } =20 int postcopy_ram_prepare_discard(MigrationIncomingState *mis) { - assert(0); + g_assert_not_reached(); return -1; } =20 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; } =20 int postcopy_ram_incoming_setup(MigrationIncomingState *mis) { - assert(0); + g_assert_not_reached(); return -1; } =20 int postcopy_place_page(MigrationIncomingState *mis, void *host, void *fro= m, RAMBlock *rb) { - assert(0); + g_assert_not_reached(); return -1; } =20 int postcopy_place_page_zero(MigrationIncomingState *mis, void *host, RAMBlock *rb) { - assert(0); + g_assert_not_reached(); return -1; } =20 @@ -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) =20 bool ram_write_tracking_compatible(void) { - assert(0); + g_assert_not_reached(); return false; } =20 int ram_write_tracking_start(void) { - assert(0); + g_assert_not_reached(); return -1; } =20 void ram_write_tracking_stop(void) { - assert(0); + g_assert_not_reached(); } #endif /* defined(__linux__) */ =20 --=20 2.39.2