From patchwork Thu Sep 12 07:39:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 827820 Delivered-To: patch@linaro.org Received: by 2002:adf:ab1c:0:b0:367:895a:4699 with SMTP id q28csp1143783wrc; Thu, 12 Sep 2024 00:47:58 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUbjvjmu4T2VhdJpzoJIw8HP75LfIvlgOe84p82qn6Lh/t8a4Ghh9xZ4qk6/gB3UVHCMkFxLA==@linaro.org X-Google-Smtp-Source: AGHT+IE43Bl87rA8HD1yYAAfV1Yqqf/jewGiHogYeqDySf5H4ruBFaFQWMrRvBvoS3D1/4O9bQYW X-Received: by 2002:a05:620a:408b:b0:7a9:c964:b358 with SMTP id af79cd13be357-7a9e5ee71d8mr257981385a.6.1726127278447; Thu, 12 Sep 2024 00:47:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726127278; cv=none; d=google.com; s=arc-20240605; b=iw807vSlnbgWsuQ8S9MyIx/5ASXqcE/r8AEO4n8oIo3NF4PrWp14yWtpIQrpGDZi53 RKZ23rp1jqTPjZXBtf+VGWTQSGF96vwkF6hqpoB6Bwrjj40+i4ztLUjsz/B5z2vEtmHs DBzODqEWwYUERdeCzzkdF1jn63u/q80LXqdKY9/R4L1M624y6iU6NAHs0c6xwPDMXe8L ounn33tEKLPudhNDiWQAIjwXUjIRTevrP+GjM+Kwzi2EpWKD3OcSyKPmPpDF0vfisyOZ ws22czu1TWGGOIS+2FPU5AQFoz5WIkQDvWXPPc3dJpUAB+6ibzEgOynKu9d6LiylFRQ5 Tz/A== 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=4vXYJ3kbU9hsr2ebFSyiWuonl8XOv822rbyHItwqNMM=; fh=9lXHm2cv0EOsvaESlQxkp+iopfNbpS2ZXLeBYSea/ko=; b=fvtSBNzuWWuwvNWacleHgFfE+RyJcdRwI0CVhRzRsTmprKOVqX+SM4ng+CB7qbWa4Z NhPGMuMp6QcdhI3LO3ZB5yqjvtvMZVCY/faFmtgaV1GteKnI6UThnjbh84u7vsRD4+5g 8110glZbegn6W+IySXEyEDdZ7G4CRIkM3i9ENvaGZZvq9bOBf+CVVoK7NL9HsMaF7Jxk rePkqGjxxjA5kjkANECsgrk8yvv5oqV5IcEYjnBMoeRCSRjjCcQGZzj4iB5M6LDl1h9+ V8tTCy6kHkNqEFi4zZp/NGrYIbCSJ21N+7KfdTbAWJWGFpVxy5mzl+b4WMhR7CvNl9Ou RSsQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EoJkjWMA; 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 d75a77b69052e-458339953d7si83726841cf.267.2024.09.12.00.47.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Sep 2024 00:47:58 -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=EoJkjWMA; 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 1soeW8-0002IE-H2; Thu, 12 Sep 2024 03:45:28 -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 1soeS5-0000cd-TM for qemu-devel@nongnu.org; Thu, 12 Sep 2024 03:41:19 -0400 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1soeS3-00014K-VL for qemu-devel@nongnu.org; Thu, 12 Sep 2024 03:41:17 -0400 Received: by mail-pg1-x532.google.com with SMTP id 41be03b00d2f7-6bce380eb96so444886a12.0 for ; Thu, 12 Sep 2024 00:41:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1726126874; x=1726731674; 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=4vXYJ3kbU9hsr2ebFSyiWuonl8XOv822rbyHItwqNMM=; b=EoJkjWMAhuc9kB9FrDcpcya7ZH4X2LhHCwmGH2/t4d21ncKUHqMO9yCzSn/JmEhQJ7 JBDsxPIvFi175EyADtVcB5hgWdSEApLfMxK/cKtXImfG2WrRUFmwNzDsd5a86lXQ9Zo9 eaLkIUAluEpTcv8yieFL3YOuMtZJX8yTdZtdZKKISCtw1mAGESlh+aXDeu4VfsXuXq1i BBp9ughBgj/mA9ce9zV+r8lA7E8Cq4/pks8tcnACABT4yv95aSDAOjHUmEXI2s3wiAXQ ZzCGzSk4IaAJZlNTqdZIbsUJWdS5XvT7uqZem1Rz55sAWcR8FQqPNxxMf3gaa8gHqdQ1 eNbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726126874; x=1726731674; 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=4vXYJ3kbU9hsr2ebFSyiWuonl8XOv822rbyHItwqNMM=; b=endtC+P9LSgY9L28WoJpcsSW8NwhWYbFQFAm6OU1LYe21nc2Mc5VZdOfCnnXgSh3ot RTzbsul9Bxy3GRax3I8aNQe3tQvM/0X+zhm0p6NVvprmGBr6lmdar2q4sJxFq0tvi3sS j/ZX59ZLQ4Aq1Au9zrzKCeBwiAO12ntrajiTR53OLfWJJnCBxjE01CJpI2f++q1RBrk+ HCJ0NZ+pzrQ5CeVhhcnt53cR1XmgkKOIEhcCEeIzn8t54JIxFK6OvhOsWhbkr9LO4bvj DnR9sctJ1BFXpGAwQZSiYbnytBT/yw5WYsm+VqwwevfVNRNqucxVO4p8EdpDpNR5+t5J vOEg== X-Gm-Message-State: AOJu0YxnKjw+oCxoXZu8igH/nPlZragNpdiU0D7pvLIEtK42IA8Ax+eD 8/cnXtpdzfyK2EOi6IzwJuVzimkFN6qkuaILhOzDuTk2nENLxOjEWdn63B/8dpcrvCPDVScrVE5 +evoBbNH2 X-Received: by 2002:a05:6a20:e30b:b0:1cf:6d67:c078 with SMTP id adf61e73a8af0-1cf76237989mr2787587637.42.1726126874107; Thu, 12 Sep 2024 00:41:14 -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.41.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Sep 2024 00:41:13 -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 41/48] hw/net: remove return after g_assert_not_reached() Date: Thu, 12 Sep 2024 00:39:14 -0700 Message-Id: <20240912073921.453203-42-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::532; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pg1-x532.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. Signed-off-by: Pierrick Bouvier Reviewed-by: Richard Henderson --- hw/net/e1000e_core.c | 2 -- hw/net/igb_core.c | 2 -- hw/net/vmxnet3.c | 1 - 3 files changed, 5 deletions(-) diff --git a/hw/net/e1000e_core.c b/hw/net/e1000e_core.c index 248381f9766..2e4c50ddbaf 100644 --- a/hw/net/e1000e_core.c +++ b/hw/net/e1000e_core.c @@ -562,7 +562,6 @@ e1000e_rss_calc_hash(E1000ECore *core, break; default: g_assert_not_reached(); - return 0; } return net_rx_pkt_calc_rss_hash(pkt, type, (uint8_t *) &core->mac[RSSRK]); @@ -841,7 +840,6 @@ e1000e_ring_free_descr_num(E1000ECore *core, const E1000ERingInfo *r) } g_assert_not_reached(); - return 0; } static inline bool diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c index 6be61407715..5dffa12c64b 100644 --- a/hw/net/igb_core.c +++ b/hw/net/igb_core.c @@ -398,7 +398,6 @@ igb_rss_calc_hash(IGBCore *core, struct NetRxPkt *pkt, E1000E_RSSInfo *info) break; default: g_assert_not_reached(); - return 0; } return net_rx_pkt_calc_rss_hash(pkt, type, (uint8_t *) &core->mac[RSSRK]); @@ -747,7 +746,6 @@ igb_ring_free_descr_num(IGBCore *core, const E1000ERingInfo *r) } g_assert_not_reached(); - return 0; } static inline bool diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index 63a91877730..6b5185c707b 100644 --- a/hw/net/vmxnet3.c +++ b/hw/net/vmxnet3.c @@ -456,7 +456,6 @@ vmxnet3_setup_tx_offloads(VMXNET3State *s) default: g_assert_not_reached(); - return false; } return true;