From: Fabiano Rosas <farosas@suse.de>
To: Pierrick Bouvier <pierrick.bouvier@linaro.org>, qemu-devel@nongnu.org
Cc: "Zhao Liu" <zhao1.liu@intel.com>,
"Richard W.M. Jones" <rjones@redhat.com>,
"Joel Stanley" <joel@jms.id.au>, "Kevin Wolf" <kwolf@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
qemu-arm@nongnu.org, "Corey Minyard" <minyard@acm.org>,
"Eric Farman" <farman@linux.ibm.com>,
"Thomas Huth" <thuth@redhat.com>,
"Keith Busch" <kbusch@kernel.org>, "WANG Xuerui" <git@xen0n.name>,
"Hyman Huang" <yong.huang@smartx.com>,
"Stefan Berger" <stefanb@linux.vnet.ibm.com>,
"Michael Rolnik" <mrolnik@gmail.com>,
"Alistair Francis" <alistair.francis@wdc.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>,
"Sriram Yagnaraman" <sriram.yagnaraman@ericsson.com>,
"Palmer Dabbelt" <palmer@dabbelt.com>,
qemu-riscv@nongnu.org, "Ani Sinha" <anisinha@redhat.com>,
"Halil Pasic" <pasic@linux.ibm.com>,
"Jesper Devantier" <foss@defmacro.it>,
"Laurent Vivier" <laurent@vivier.eu>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Igor Mammedov" <imammedo@redhat.com>,
kvm@vger.kernel.org, "Alex Bennée" <alex.bennee@linaro.org>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Fam Zheng" <fam@euphon.net>,
qemu-s390x@nongnu.org, "Hanna Reitz" <hreitz@redhat.com>,
"Nicholas Piggin" <npiggin@gmail.com>,
"Eduardo Habkost" <eduardo@habkost.net>,
"Laurent Vivier" <lvivier@redhat.com>,
"Rob Herring" <robh@kernel.org>,
"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
qemu-block@nongnu.org,
"Maciej S. Szmigiero" <maciej.szmigiero@oracle.com>,
qemu-ppc@nongnu.org,
"Daniel Henrique Barboza" <danielhb413@gmail.com>,
"Christian Borntraeger" <borntraeger@linux.ibm.com>,
"Harsh Prateek Bora" <harshpb@linux.ibm.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Nina Schoetterl-Glausch" <nsg@linux.ibm.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Helge Deller" <deller@gmx.de>,
"Dmitry Fleytman" <dmitry.fleytman@gmail.com>,
"Daniel Henrique Barboza" <dbarboza@ventanamicro.com>,
"Akihiko Odaki" <akihiko.odaki@daynix.com>,
"Marcelo Tosatti" <mtosatti@redhat.com>,
"David Gibson" <david@gibson.dropbear.id.au>,
"Aurelien Jarno" <aurelien@aurel32.net>,
"Liu Zhiwei" <zhiwei_liu@linux.alibaba.com>,
"Yanan Wang" <wangyanan55@huawei.com>,
"Peter Xu" <peterx@redhat.com>, "Bin Meng" <bmeng.cn@gmail.com>,
"Weiwei Li" <liwei1518@gmail.com>,
"Klaus Jensen" <its@irrelevant.dk>,
"Jean-Christophe Dubois" <jcd@tribudubois.net>,
"Jason Wang" <jasowang@redhat.com>,
"Pierrick Bouvier" <pierrick.bouvier@linaro.org>
Subject: Re: [PATCH 08/39] migration: replace assert(0) with g_assert_not_reached()
Date: Tue, 10 Sep 2024 19:25:10 -0300 [thread overview]
Message-ID: <87plpbqh89.fsf@suse.de> (raw)
In-Reply-To: <20240910221606.1817478-9-pierrick.bouvier@linaro.org>
Pierrick Bouvier <pierrick.bouvier@linaro.org> writes:
> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
> ---
> 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__) */
Reviewed-by: Fabiano Rosas <farosas@suse.de>
next prev parent reply other threads:[~2024-09-10 22:25 UTC|newest]
Thread overview: 122+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-10 22:15 [PATCH 00/39] Use g_assert_not_reached instead of (g_)assert(0, false) Pierrick Bouvier
2024-09-10 22:15 ` [PATCH 01/39] docs/spin: replace assert(0) with g_assert_not_reached() Pierrick Bouvier
2024-09-11 1:36 ` Richard Henderson
2024-09-11 12:33 ` Eric Blake
2024-09-11 12:37 ` Eric Blake
2024-09-11 12:46 ` Maciej S. Szmigiero
2024-09-11 12:51 ` Richard W.M. Jones
2024-09-11 15:25 ` Pierrick Bouvier
2024-09-11 16:55 ` Richard Henderson
2024-09-11 16:13 ` Thomas Huth
2024-09-12 0:28 ` Pierrick Bouvier
2024-09-11 15:23 ` Pierrick Bouvier
2024-09-10 22:15 ` [PATCH 02/39] hw/acpi: " Pierrick Bouvier
2024-09-11 1:37 ` Richard Henderson
2024-09-10 22:15 ` [PATCH 03/39] hw/arm: " Pierrick Bouvier
2024-09-11 1:38 ` Richard Henderson
2024-09-10 22:15 ` [PATCH 04/39] hw/char: " Pierrick Bouvier
2024-09-11 1:39 ` Richard Henderson
2024-09-11 6:11 ` Philippe Mathieu-Daudé
2024-09-10 22:15 ` [PATCH 05/39] hw/core: " Pierrick Bouvier
2024-09-11 1:43 ` Richard Henderson
2024-09-11 6:12 ` Philippe Mathieu-Daudé
2024-09-10 22:15 ` [PATCH 06/39] hw/net: " Pierrick Bouvier
2024-09-11 2:06 ` Richard Henderson
2024-09-10 22:15 ` [PATCH 07/39] hw/watchdog: " Pierrick Bouvier
2024-09-11 2:14 ` Richard Henderson
2024-09-11 6:12 ` Philippe Mathieu-Daudé
2024-09-11 8:35 ` Richard W.M. Jones
2024-09-10 22:15 ` [PATCH 08/39] migration: " Pierrick Bouvier
2024-09-10 22:25 ` Fabiano Rosas [this message]
2024-09-11 2:17 ` Richard Henderson
2024-09-11 2:37 ` Pierrick Bouvier
2024-09-11 13:40 ` Peter Xu
2024-09-10 22:15 ` [PATCH 09/39] qobject: " Pierrick Bouvier
2024-09-11 3:12 ` Richard Henderson
2024-09-11 16:56 ` Kevin Wolf
2024-09-10 22:15 ` [PATCH 10/39] system: " Pierrick Bouvier
2024-09-11 3:13 ` Richard Henderson
2024-09-11 6:12 ` Philippe Mathieu-Daudé
2024-09-10 22:15 ` [PATCH 11/39] target/ppc: " Pierrick Bouvier
2024-09-11 3:14 ` Richard Henderson
2024-09-11 15:27 ` Pierrick Bouvier
2024-09-11 9:40 ` Daniel Henrique Barboza
2024-09-10 22:15 ` [PATCH 12/39] tests/qtest: " Pierrick Bouvier
2024-09-11 3:17 ` Richard Henderson
2024-09-11 5:43 ` Thomas Huth
2024-09-10 22:15 ` [PATCH 13/39] tests/unit: " Pierrick Bouvier
2024-09-11 3:19 ` Richard Henderson
2024-09-10 22:15 ` [PATCH 14/39] include/hw/s390x: replace assert(false) " Pierrick Bouvier
2024-09-11 3:19 ` Richard Henderson
2024-09-11 5:42 ` Thomas Huth
2024-09-10 22:15 ` [PATCH 15/39] block: " Pierrick Bouvier
2024-09-11 3:20 ` Richard Henderson
2024-09-11 15:47 ` Kevin Wolf
2024-09-10 22:15 ` [PATCH 16/39] hw/hyperv: " Pierrick Bouvier
2024-09-11 3:21 ` Richard Henderson
2024-09-11 10:17 ` Maciej S. Szmigiero
2024-09-10 22:15 ` [PATCH 17/39] hw/net: " Pierrick Bouvier
2024-09-11 3:21 ` Richard Henderson
2024-09-10 22:15 ` [PATCH 18/39] hw/nvme: " Pierrick Bouvier
2024-09-11 3:22 ` Richard Henderson
2024-09-10 22:15 ` [PATCH 19/39] hw/pci: " Pierrick Bouvier
2024-09-11 3:22 ` Richard Henderson
2024-09-11 5:50 ` Philippe Mathieu-Daudé
2024-09-11 15:29 ` Pierrick Bouvier
2024-09-10 22:15 ` [PATCH 20/39] hw/ppc: " Pierrick Bouvier
2024-09-11 3:26 ` Richard Henderson
2024-09-11 9:41 ` Daniel Henrique Barboza
2024-09-11 14:10 ` BALATON Zoltan
2024-09-11 15:32 ` Pierrick Bouvier
2024-09-11 16:08 ` BALATON Zoltan
2024-09-10 22:15 ` [PATCH 21/39] migration: " Pierrick Bouvier
2024-09-10 22:26 ` Fabiano Rosas
2024-09-11 3:26 ` Richard Henderson
2024-09-11 3:27 ` Richard Henderson
2024-09-11 13:40 ` Peter Xu
2024-09-10 22:15 ` [PATCH 22/39] target/i386/kvm: " Pierrick Bouvier
2024-09-11 3:27 ` Richard Henderson
2024-09-10 22:15 ` [PATCH 23/39] tests/qtest: " Pierrick Bouvier
2024-09-11 3:28 ` Richard Henderson
2024-09-10 22:15 ` [PATCH 24/39] accel/tcg: remove break after g_assert_not_reached() Pierrick Bouvier
2024-09-11 3:28 ` Richard Henderson
2024-09-10 22:15 ` [PATCH 25/39] block: " Pierrick Bouvier
2024-09-11 3:29 ` Richard Henderson
2024-09-11 8:35 ` Richard W.M. Jones
2024-09-11 15:53 ` Kevin Wolf
2024-09-10 22:15 ` [PATCH 26/39] hw/acpi: " Pierrick Bouvier
2024-09-11 3:30 ` Richard Henderson
2024-09-10 22:15 ` [PATCH 27/39] hw/gpio: " Pierrick Bouvier
2024-09-11 3:29 ` Richard Henderson
2024-09-11 6:12 ` Philippe Mathieu-Daudé
2024-09-10 22:15 ` [PATCH 28/39] hw/misc: " Pierrick Bouvier
2024-09-11 3:31 ` Richard Henderson
2024-09-11 6:13 ` Philippe Mathieu-Daudé
2024-09-10 22:15 ` [PATCH 29/39] hw/net: " Pierrick Bouvier
2024-09-11 3:31 ` Richard Henderson
2024-09-10 22:15 ` [PATCH 30/39] hw/pci-host: " Pierrick Bouvier
2024-09-11 3:32 ` Richard Henderson
2024-09-11 6:13 ` Philippe Mathieu-Daudé
2024-09-10 22:15 ` [PATCH 31/39] hw/scsi: " Pierrick Bouvier
2024-09-11 3:33 ` Richard Henderson
2024-09-11 15:56 ` Kevin Wolf
2024-09-10 22:15 ` [PATCH 32/39] hw/tpm: " Pierrick Bouvier
2024-09-11 3:33 ` Richard Henderson
2024-09-10 22:16 ` [PATCH 33/39] target/arm: " Pierrick Bouvier
2024-09-11 3:33 ` Richard Henderson
2024-09-10 22:16 ` [PATCH 34/39] target/riscv: " Pierrick Bouvier
2024-09-11 3:34 ` Richard Henderson
2024-09-11 9:35 ` Daniel Henrique Barboza
2024-09-10 22:16 ` [PATCH 35/39] tests/qtest: " Pierrick Bouvier
2024-09-11 3:34 ` Richard Henderson
2024-09-10 22:16 ` [PATCH 36/39] ui: " Pierrick Bouvier
2024-09-11 3:34 ` Richard Henderson
2024-09-11 6:13 ` Philippe Mathieu-Daudé
2024-09-10 22:16 ` [PATCH 37/39] fpu: " Pierrick Bouvier
2024-09-11 3:35 ` Richard Henderson
2024-09-10 22:16 ` [PATCH 38/39] tcg/loongarch64: " Pierrick Bouvier
2024-09-11 3:35 ` Richard Henderson
2024-09-10 22:16 ` [PATCH 39/39] scripts/checkpatch.pl: emit error when using assert(false) Pierrick Bouvier
2024-09-11 3:35 ` Richard Henderson
2024-09-11 8:39 ` [PATCH 00/39] Use g_assert_not_reached instead of (g_)assert(0,false) Philippe Mathieu-Daudé
2024-09-11 15:34 ` Pierrick Bouvier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87plpbqh89.fsf@suse.de \
--to=farosas@suse.de \
--cc=akihiko.odaki@daynix.com \
--cc=alex.bennee@linaro.org \
--cc=alistair.francis@wdc.com \
--cc=anisinha@redhat.com \
--cc=armbru@redhat.com \
--cc=aurelien@aurel32.net \
--cc=bmeng.cn@gmail.com \
--cc=borntraeger@linux.ibm.com \
--cc=danielhb413@gmail.com \
--cc=david@gibson.dropbear.id.au \
--cc=dbarboza@ventanamicro.com \
--cc=deller@gmx.de \
--cc=dmitry.fleytman@gmail.com \
--cc=eduardo@habkost.net \
--cc=fam@euphon.net \
--cc=farman@linux.ibm.com \
--cc=foss@defmacro.it \
--cc=git@xen0n.name \
--cc=harshpb@linux.ibm.com \
--cc=hreitz@redhat.com \
--cc=imammedo@redhat.com \
--cc=its@irrelevant.dk \
--cc=jasowang@redhat.com \
--cc=jcd@tribudubois.net \
--cc=joel@jms.id.au \
--cc=kbusch@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=kwolf@redhat.com \
--cc=laurent@vivier.eu \
--cc=liwei1518@gmail.com \
--cc=lvivier@redhat.com \
--cc=maciej.szmigiero@oracle.com \
--cc=marcandre.lureau@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=minyard@acm.org \
--cc=mrolnik@gmail.com \
--cc=mst@redhat.com \
--cc=mtosatti@redhat.com \
--cc=npiggin@gmail.com \
--cc=nsg@linux.ibm.com \
--cc=palmer@dabbelt.com \
--cc=pasic@linux.ibm.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=peterx@redhat.com \
--cc=philmd@linaro.org \
--cc=pierrick.bouvier@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=rjones@redhat.com \
--cc=robh@kernel.org \
--cc=sriram.yagnaraman@ericsson.com \
--cc=stefanb@linux.vnet.ibm.com \
--cc=thuth@redhat.com \
--cc=wangyanan55@huawei.com \
--cc=yong.huang@smartx.com \
--cc=zhao1.liu@intel.com \
--cc=zhiwei_liu@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).