From patchwork Thu Sep 12 07:38:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 827797 Delivered-To: patch@linaro.org Received: by 2002:adf:ab1c:0:b0:367:895a:4699 with SMTP id q28csp1142180wrc; Thu, 12 Sep 2024 00:42:08 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU1yGXVt6iUBO6h/zvAfai+32NN3nG4yUdJUuRL0VOYLdWYedvKtMMVZr0K90xYfKeyyIO7mQ==@linaro.org X-Google-Smtp-Source: AGHT+IHO+jlLAhgRiShviZFljRQkwoPu3FVsKIGU+uvZN/77x8x0b1ye7A19LWnXolEzJciAcdPa X-Received: by 2002:a05:620a:462b:b0:79e:e9ae:3c54 with SMTP id af79cd13be357-7a9e5fb8470mr245412785a.54.1726126928597; Thu, 12 Sep 2024 00:42:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726126928; cv=none; d=google.com; s=arc-20240605; b=EAxt6mz+K3i2KNU2WZSdJqEOrLnvCWtB8V3QYeLDBmeIs2mj0C4ph6c18pgD2jnLS2 aylwwjeItUxGf0KqNM/UuOanwED3/A1PFG916t6zf5uzNZ3wc4HquSnMwmRTroSPdjNF SvYYucjvqno3H43ru6uL17dmh+zHVEzXs5oy+iujV1T8FS/IdVP5sh8KuaF20rRWee4m f8ogUXiC4vvmrkFl3WvLDYK3qH5Z+ocDbjb01KpyjRnC62iWibhXKoNrzKzIrK+VhKzg eTir0rH16VrXZ2LMgWdXNRO9r3PeaRkktWzSfbx3MIzjnK3oNuyTFI9S+EEPrNk2hLKD WRGA== 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=P59BoCfpfnoUAXReWsDYStuySlGSOxKrMipSHR5f/PE=; fh=9lXHm2cv0EOsvaESlQxkp+iopfNbpS2ZXLeBYSea/ko=; b=OloM8suB042mwRiiKeD2xRIhgv3LmfJznGECsue+BzuCyG/ZuVzk+aqXTXzvlC4iDq 4pV4RSxBiNmH/36/zge9cyhvfkX+mZkSkDsWaIR6t8uSbR0YA79TSJHKt5MuqSPXYx95 m1j//aM1epdJsFZ8hXrI6jXjXLCm1QLstY/Cs3MO4J6xNnKyaWeLwL7K5nXFk9NjuHt4 wqSCn4duc2/TgMDOipQYxl5n1ioQBY30CWRHG4HFYQHeq8PI6c9B/y3G33vNUWzDWBr4 ItMktlgF5NBOzAMMKMvlF6KmR/n4zJ6eTdr3M9sIplbP4pla18ogisfn92sWcLehKuva x0Vg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ESSz9u+X; 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-7a9a7a358a3si1238252385a.289.2024.09.12.00.42.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Sep 2024 00:42:08 -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=ESSz9u+X; 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 1soeRj-0006fU-Vy; Thu, 12 Sep 2024 03:40:56 -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 1soeR8-0003rK-VA for qemu-devel@nongnu.org; Thu, 12 Sep 2024 03:40:23 -0400 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1soeR2-0000ZH-U5 for qemu-devel@nongnu.org; Thu, 12 Sep 2024 03:40:16 -0400 Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-20570b42f24so7760235ad.1 for ; Thu, 12 Sep 2024 00:40:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1726126808; x=1726731608; 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=P59BoCfpfnoUAXReWsDYStuySlGSOxKrMipSHR5f/PE=; b=ESSz9u+Xmbp1P1wPbvvM3ZstVP5BRINJj7DHte7HVFcH+v55tniZsoHHOA7VxyUafe J0OZ+f9L1ppTDir4PBwAwQHAzyA5vXeCZ1/u/SVMYplOePMo5GebIuthWWrzTfXXE6CC iShNSFY76StU5cH/73aQbbAiz0/Ev3W2hpBk54vScjdnrQ9fTPWY5YrYQRxFoBR4nfZQ XlIO5fIujlGhAKL4qi+2Dah9f1N7VVO0kVRSDZ0v/RR+vdGV5cvMPKaEkzbxdrz7l74Y Q3c191eEtUKWhewygkq/q7NmhNHCpslpBvRNm6bqJ21VhTfELyWdXb1F1/S6cWu3csqL 0Jdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726126808; x=1726731608; 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=P59BoCfpfnoUAXReWsDYStuySlGSOxKrMipSHR5f/PE=; b=VOHIYPX4nfYbwxEEZTS1GVt+j4tlJYME72+L6mwBao8TINQjjyU/yP3C4tDnD+YGQB XtncGaBgOYI2W7VaJtzjuFVRCYjCVKD9LsuAZ6gPVfX7VkgbYZtc0QRj8u3dwNh++jlB Ay8U4sJWsMnOGk9clh5+xwmDhdzOux+0F6PbnwY8man0pAY+tEbKs8icVpMGTFngIZGO JKWwGNfRt3nrZzpnQYAoVfjRyInf6knc5jQTFjdEXGtfEVWvu5bPjB0i9PGaKbGZrQxo To+P0zcUxqOaO3EHVcPufd8NWOtU3u+lxPFC8wCZKLHm/R31yboScLw1dCWxE8uXzFu2 65/g== X-Gm-Message-State: AOJu0Ywr4+HIAGw1Fr/aTWVQqoZ+HH8KQFSyyGclghu6Lz3MQvSAjHVM +tFS5EUlYO90IiqhTWFe2Eex9OOLOX/VpdwGD3TPkhCTC5V33pKO/YX0mMQh9vno46urZJmEGSI LGDtJaIBo X-Received: by 2002:a05:6a21:114d:b0:1c6:ae03:6607 with SMTP id adf61e73a8af0-1cf75ea27bcmr3064643637.6.1726126807996; Thu, 12 Sep 2024 00:40:07 -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.40.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Sep 2024 00:40:07 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Jason Wang , =?utf-8?q?Alex_Benn=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_Mathieu-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_P=2E_Berrang=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_Lureau?= , 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 16/48] hw/hyperv: replace assert(false) with g_assert_not_reached() Date: Thu, 12 Sep 2024 00:38:49 -0700 Message-Id: <20240912073921.453203-17-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 Received-SPF: pass client-ip=2607:f8b0:4864:20::632; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x632.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=ham 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 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: Richard Henderson Reviewed-by: Maciej S. Szmigiero Signed-off-by: Pierrick Bouvier --- hw/hyperv/hyperv_testdev.c | 6 +++--- hw/hyperv/vmbus.c | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/hyperv/hyperv_testdev.c b/hw/hyperv/hyperv_testdev.c index 9a56ddf83fe..ef50e490c4e 100644 --- a/hw/hyperv/hyperv_testdev.c +++ b/hw/hyperv/hyperv_testdev.c @@ -88,7 +88,7 @@ static TestSintRoute *sint_route_find(HypervTestDev *dev, return sint_route; } } - assert(false); + g_assert_not_reached(); return NULL; } @@ -187,7 +187,7 @@ static void msg_conn_destroy(HypervTestDev *dev, uint8_t conn_id) return; } } - assert(false); + g_assert_not_reached(); } static void evt_conn_handler(EventNotifier *notifier) @@ -237,7 +237,7 @@ static void evt_conn_destroy(HypervTestDev *dev, uint8_t conn_id) return; } } - assert(false); + g_assert_not_reached(); } static uint64_t hv_test_dev_read(void *opaque, hwaddr addr, unsigned size) diff --git a/hw/hyperv/vmbus.c b/hw/hyperv/vmbus.c index 490d805d298..df47aae72b8 100644 --- a/hw/hyperv/vmbus.c +++ b/hw/hyperv/vmbus.c @@ -1874,7 +1874,7 @@ static void send_create_gpadl(VMBus *vmbus) } } - assert(false); + g_assert_not_reached(); } static bool complete_create_gpadl(VMBus *vmbus) @@ -1889,7 +1889,7 @@ static bool complete_create_gpadl(VMBus *vmbus) } } - assert(false); + g_assert_not_reached(); return false; } @@ -1931,7 +1931,7 @@ static void send_teardown_gpadl(VMBus *vmbus) } } - assert(false); + g_assert_not_reached(); } static bool complete_teardown_gpadl(VMBus *vmbus) @@ -1946,7 +1946,7 @@ static bool complete_teardown_gpadl(VMBus *vmbus) } } - assert(false); + g_assert_not_reached(); return false; } @@ -1996,7 +1996,7 @@ static void send_open_channel(VMBus *vmbus) } } - assert(false); + g_assert_not_reached(); } static bool complete_open_channel(VMBus *vmbus) @@ -2020,7 +2020,7 @@ static bool complete_open_channel(VMBus *vmbus) } } - assert(false); + g_assert_not_reached(); return false; }