From patchwork Thu Sep 12 07:38:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 827796 Delivered-To: patch@linaro.org Received: by 2002:adf:ab1c:0:b0:367:895a:4699 with SMTP id q28csp1142111wrc; Thu, 12 Sep 2024 00:41:53 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUhU9PGL731K02SGqIV4U9zV+AblshRmkgsz/xPXmp0IAfdZBseaWGX/q09BfQGBeJqIOIStQ==@linaro.org X-Google-Smtp-Source: AGHT+IGqYf2yjHTMDZK55WPLNMWphtnxkD0K5EPK7q+7LV1uQ09uN+81kuY9Opkc2fyAUc8DnVsq X-Received: by 2002:a05:620a:172a:b0:7a9:b2f4:42e0 with SMTP id af79cd13be357-7a9bf97c1d8mr1689702885a.15.1726126913596; Thu, 12 Sep 2024 00:41:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726126913; cv=none; d=google.com; s=arc-20240605; b=aCYWAosQAUaLyQKfPZKV1eO7PhWLh50F/vHK+yuT6QlfIUAwTOegJ4eU7GKLmNmLAg 3e/NcKzp++ZBaEyTTQYtR0ESZPr1xjzBzJ3dZ2+7ktxJf5afvebTlfnqxesRX0p1Qs37 XZkZXcfEu2kJl99i2IcwRtkwNuysWvEYt6340/h4beVqzlH8qGLCHrSPDgOd9Du5FKwZ 3i8wEMlHUKDuqYRYNQD5qtwzIsxliFy5+Gz9fhHlAXUI6p1QsstbC2CsJN+pAWqsc5Ui WqdZG4H2FGVI4PLuNLoquy8RUx8E2WQg5rEAjDCGiEcyx9yUbfuso1MVDORiF/4PCT75 8SQQ== 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=LUkTeAVAzR9AYc2U0wxTWgfR6a0KVPFNlmWMjsS+ujQ=; fh=9lXHm2cv0EOsvaESlQxkp+iopfNbpS2ZXLeBYSea/ko=; b=TfDUY6AlsGGpfvXjwjDPmdr/Avg/gyBKLMPmuwfP/bdsjvAejjT49DvtIGDHN/RQSy JoaQ9Xs0xSJmls91D3VaXI/cm/l9sxEP32cHpN6mUjmL1AGCN6B1p/qzkmWF2UgLkKI5 8OdXjQyTBeI2utde4Vj+UUqYOaFkn+46tNTREDmfF73mPa7umJ9HCT/9Om8r2S0k/W7C tu9Bln8ip8GT7SBUGdXEkMCLe9J8PuVDQ3R4Qz9bDZgGEv9kdYQ7LIc2kyWZdq2ZZMSg 15V64wu+5X168u02KRKrY2U8E+pqNM+2xsp95nCiVpq1vTOvaT1r6hBkDu2AKJul2Ldk ZiYg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kAFJU2dR; 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-7a9ad0ce6c2si1069655985a.450.2024.09.12.00.41.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Sep 2024 00:41:53 -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=kAFJU2dR; 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 1soeS8-0000mi-OH; Thu, 12 Sep 2024 03:41:21 -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 1soeRB-0003z2-2G for qemu-devel@nongnu.org; Thu, 12 Sep 2024 03:40:24 -0400 Received: from mail-pg1-x52e.google.com ([2607:f8b0:4864:20::52e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1soeR4-0000Zi-O4 for qemu-devel@nongnu.org; Thu, 12 Sep 2024 03:40:18 -0400 Received: by mail-pg1-x52e.google.com with SMTP id 41be03b00d2f7-7d666fb3fb9so318871a12.0 for ; Thu, 12 Sep 2024 00:40:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1726126810; x=1726731610; 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=LUkTeAVAzR9AYc2U0wxTWgfR6a0KVPFNlmWMjsS+ujQ=; b=kAFJU2dRHHE7o7TMIDbGxTjwfGT5qb3GgZARZT6ATH1SA81r2Qa2PQyj9U0eUxjziF KukYoaJZiy0XoCN9m8C0AMdI4QraSs1ncmBpsi/XbJWBW0WBMQXMB4zxKAnSOdi6cZuR +JYrMbiLEfmJlkA3QexglycrOPFccEid6jBDeKHuTNKygz/y7FL7SE87szl2hHrmEIjN qLcCcxm93AAT/Ap8Fno0KoFb0oOpB7oAhTy+n7DEW/dUr2ih5qOtlkoI2F+3cbReN8n6 4ZBRat6V0S1aH8hTNjnK2VAthOKUjUVNlz8Dfc8MwkRLGTzLVH+I0yZRK0x0MpE1Sd9x +uVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726126810; x=1726731610; 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=LUkTeAVAzR9AYc2U0wxTWgfR6a0KVPFNlmWMjsS+ujQ=; b=gpSC/bi8m+xSmu4qsQnRmDDtydUpRLxJsEFpTHHwsKF5r+MhfnDLBwp25z7ycGofRe 7S4qv+J04Ga9rgo0AaWCJ0nN6+s8+gHnfpL0RXk64QM7TbxVWhbz3bgZPq1fUgdckRVo UTdFGuETVGCcqAIHFw5o68av+EWD+vXzKeR6+EFhsXznlBUsBYCzDZkN1Eidy2GOYL0v 1sBkN841h7v+/LGrsABSpNMxCowrYd7L0Ki9LsofzeQ9lU8MbsyHtGu0MIbZjwnOiyNR yZqnJR/0g25iFoVf/7JCQVsQJwfAiT/i9mG/28fY7lwUswZRVOQGA5qWt8n1RXo/X1L1 E+NQ== X-Gm-Message-State: AOJu0YySz9acm8x64rR2pYcSISqPW21P4DeTife1fIjTLmD0KCQsi77x lNqkrin8kMnSJPnVHpRU2XN9TxqIhvCgMVKzCEDnk/8d0CuG+ENZzlmqbaNNreCXofzIEDl8Mb3 HofASJZEM X-Received: by 2002:a05:6a21:1798:b0:1c8:de01:e7e5 with SMTP id adf61e73a8af0-1cf75616bffmr2800213637.15.1726126810532; Thu, 12 Sep 2024 00:40:10 -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.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Sep 2024 00:40:10 -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 17/48] hw/net: replace assert(false) with g_assert_not_reached() Date: Thu, 12 Sep 2024 00:38:50 -0700 Message-Id: <20240912073921.453203-18-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::52e; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pg1-x52e.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 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 Signed-off-by: Pierrick Bouvier --- hw/net/e1000e_core.c | 2 +- hw/net/igb_core.c | 2 +- hw/net/net_rx_pkt.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/net/e1000e_core.c b/hw/net/e1000e_core.c index 3ae2a184d5d..248381f9766 100644 --- a/hw/net/e1000e_core.c +++ b/hw/net/e1000e_core.c @@ -561,7 +561,7 @@ e1000e_rss_calc_hash(E1000ECore *core, type = NetPktRssIpV6Ex; break; default: - assert(false); + g_assert_not_reached(); return 0; } diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c index bcd5f6cd9cd..6be61407715 100644 --- a/hw/net/igb_core.c +++ b/hw/net/igb_core.c @@ -397,7 +397,7 @@ igb_rss_calc_hash(IGBCore *core, struct NetRxPkt *pkt, E1000E_RSSInfo *info) type = NetPktRssIpV6Udp; break; default: - assert(false); + g_assert_not_reached(); return 0; } diff --git a/hw/net/net_rx_pkt.c b/hw/net/net_rx_pkt.c index 32e5f3f9cf7..6b9c4c9559d 100644 --- a/hw/net/net_rx_pkt.c +++ b/hw/net/net_rx_pkt.c @@ -375,7 +375,7 @@ net_rx_pkt_calc_rss_hash(struct NetRxPkt *pkt, _net_rx_rss_prepare_udp(&rss_input[0], pkt, &rss_length); break; default: - assert(false); + g_assert_not_reached(); break; }