From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AD77817BB3D for ; Tue, 10 Sep 2024 22:25:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726007117; cv=none; b=AosMSv8W+fx69KBmB9j5PbIzC1yNv2XzHz3xiM93z6tl2eerrvBZ/vCPMdzZwBajMiMWzWPRcu1aMVIrpBIncKbAyzPAJuL8DDp9iexwSFrrNB4XJjxfpD4+DmuiGQVaynnwDxHWhx0KgbPrLVn+2Uc2uRoahILB20ytNmlZgII= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726007117; c=relaxed/simple; bh=964TAfua5Dy0nuXre0wI7J9Jd2aoCVngcNHjIHTW2V8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=hC6oQ/ljP3RTBc12eJFN87Gj6jAki09e+XIckDYul9Yu2U8XwOnn7SUlcB/Dvs8Tq8rIl7mDDdTutYyTVA0M/yhWcWubxrVurKU6NdKxHSZfOhj3Yk/rPklthBzVWFSrdIe0CVviSVWYPO9jD0kj4a2Q4w5vXCPgFTIpoKuJ8cw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=IsJPlDel; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=+WN70kXv; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=IsJPlDel; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=+WN70kXv; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="IsJPlDel"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="+WN70kXv"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="IsJPlDel"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="+WN70kXv" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id BC4B521A5D; Tue, 10 Sep 2024 22:25:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1726007113; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/ngJZupkt611k1HwvHZHIrGAiSEDttJWiwH4VezFYDA=; b=IsJPlDelGX+nr5/FOwAUoKaLDkVeGRuJsjO5Ttp4G9CVC8eAQ6FHB2Xq8OP01tyhxwVDav iE717wPn8F3aN4GfLXvPenoYL+iwTd4Ois6/1tyh0KpZFNFqpY71qwVM0Zvs9MwNUskY4G cCHTofFJ4qY03+SV7OnoAaZ4rE6z6sc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1726007113; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/ngJZupkt611k1HwvHZHIrGAiSEDttJWiwH4VezFYDA=; b=+WN70kXvXhiKPcyECLNcD1EOXXM2KPPgNHW0tek0hOiIIoHIYJJEOGAY5gHwpFw6254f9c UPV9Pe4BS9VBkVBQ== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=IsJPlDel; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=+WN70kXv DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1726007113; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/ngJZupkt611k1HwvHZHIrGAiSEDttJWiwH4VezFYDA=; b=IsJPlDelGX+nr5/FOwAUoKaLDkVeGRuJsjO5Ttp4G9CVC8eAQ6FHB2Xq8OP01tyhxwVDav iE717wPn8F3aN4GfLXvPenoYL+iwTd4Ois6/1tyh0KpZFNFqpY71qwVM0Zvs9MwNUskY4G cCHTofFJ4qY03+SV7OnoAaZ4rE6z6sc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1726007113; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/ngJZupkt611k1HwvHZHIrGAiSEDttJWiwH4VezFYDA=; b=+WN70kXvXhiKPcyECLNcD1EOXXM2KPPgNHW0tek0hOiIIoHIYJJEOGAY5gHwpFw6254f9c UPV9Pe4BS9VBkVBQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id DD737132CB; Tue, 10 Sep 2024 22:25:12 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 9MvrNUjH4GbMOQAAD6G6ig (envelope-from ); Tue, 10 Sep 2024 22:25:12 +0000 From: Fabiano Rosas To: Pierrick Bouvier , 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?= Lureau , 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, Alex =?utf-8?Q?Benn=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 , Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= , Nina Schoetterl-Glausch , "Michael S. Tsirkin" , 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: Re: [PATCH 08/39] migration: replace assert(0) with g_assert_not_reached() In-Reply-To: <20240910221606.1817478-9-pierrick.bouvier@linaro.org> References: <20240910221606.1817478-1-pierrick.bouvier@linaro.org> <20240910221606.1817478-9-pierrick.bouvier@linaro.org> Date: Tue, 10 Sep 2024 19:25:10 -0300 Message-ID: <87plpbqh89.fsf@suse.de> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-Rspamd-Queue-Id: BC4B521A5D X-Spam-Level: X-Spamd-Result: default: False [-5.01 / 50.00]; BAYES_HAM(-3.00)[99.99%]; DWL_DNSWL_MED(-2.00)[suse.de:dkim]; SUSPICIOUS_RECIPS(1.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; FROM_HAS_DN(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; FREEMAIL_CC(0.00)[intel.com,redhat.com,jms.id.au,nongnu.org,acm.org,linux.ibm.com,kernel.org,xen0n.name,smartx.com,linux.vnet.ibm.com,gmail.com,wdc.com,ericsson.com,dabbelt.com,defmacro.it,vivier.eu,linaro.org,vger.kernel.org,euphon.net,habkost.net,oracle.com,gmx.de,ventanamicro.com,daynix.com,gibson.dropbear.id.au,aurel32.net,linux.alibaba.com,huawei.com,irrelevant.dk,tribudubois.net]; DKIM_TRACE(0.00)[suse.de:+]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCPT_COUNT_GT_50(0.00)[64]; TAGGED_RCPT(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; MISSING_XM_UA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,suse.de:dkim,suse.de:mid,linaro.org:email] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -5.01 X-Spam-Flag: NO Pierrick Bouvier writes: > 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 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