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: 13801619 Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) (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 209261A00C5 for ; Thu, 12 Sep 2024 07:41:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726126876; cv=none; b=lJ67hQI+sX9JJZgcpM5A8CTAhuhH4cx+wzf/JfQy+MVi6BvB2KEZYrHbjcLHzHeQwce50wFSggOlP/gu0X4xm1RI67HEGy8kuAp1M+59ONy+B8WhcCnFGrX6DYszL7MUej4PB+hrEy0vBOrPU4j4dmOq2NSEj0pNCa7H9nQtc/A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726126876; c=relaxed/simple; bh=a3+097keVJCBLEwyt/Rda1DG1GjC6WhYPgywdLMfrWI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=rmVFRBC9u86FYmRE9k1nGeCn8ZabzDIQ7wKAw4ucC+XRWWJEs7aUSzLdTSvQJdjKNIa+HGhPJQgdw2FLjmEVHxAYPrNrmx+0VcRZuLLnh4olRKmFLFSyJ7ajh61jnR27rG0kcIjE8hIiUtK1JrEfYBgBcSe1Qsb3/TgzTlIX9iA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=DuQp1Hki; arc=none smtp.client-ip=209.85.215.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="DuQp1Hki" Received: by mail-pg1-f173.google.com with SMTP id 41be03b00d2f7-6bce380eb96so444881a12.0 for ; Thu, 12 Sep 2024 00:41:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1726126874; x=1726731674; darn=vger.kernel.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=DuQp1HkicqpizgDgQsbNJasTTbs8gTw9ElOvo8nLMTJz8uOBNLVapBwHrXByvwWRBI t7fzgTKEJmySVEddpQ0NxTvEyd9cPqqLDPVJ+VVec/7pCWvN6FahSfL87a6Alb3XDa41 Roc+CWynx2jmV6WF0pz/2OqDY1jVt2UsvByq8FDjjwerYKMYipSNrZqFTHvCGuhDemom FmwM2sfn5tieV0yg9VkPEt/GoRkamqkSlCYKPlUxz5k2TMkcPCGYVLSBNbrD9Kzq+2hL YSAzwFitZ9YiV/jw74xpnbvlZvwtwloGFgZ8+Rru/bSfKhP3flZKBM8vW3s6MZ6uJuLE Ockg== 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=RoKZwnEZ0O2sRs/ty7Y2TcxeyWjZVcFePrFOfWVFUFF8i0Fp+uUIx4/JVM2Zr6APFd 9O8xI2q+AxF8dCmxqEOFDyB8TSqm44Pa57JvKQOAQrCFdKwMiVLoTuDE/x7keynHAfy+ xTXA258/mOnRvvfmuxf9SenuaEDetXo1Q7O9jYrLRbKceMbKNxc1mnKVxlGc84g5dblc 7+JReOBcbIcIZCnp9rSs5yKi4YhoRDpmVKHXJc600bps6EB4Rw8AQcXXXsuX1DnOlo9F 4Q00O1e6OwHeSTkQ6YvhTNJZpFvix3ZSOott2dixIw11lak0S9j4V01TaFWflgXUxTXe lrGQ== X-Forwarded-Encrypted: i=1; AJvYcCVSaJP2AJGlSyejhcw9FqHTB2zUHfrdzVogcBQKACkaYOeSEX+JWNJtLPgYTNJfNbgpTeg=@vger.kernel.org X-Gm-Message-State: AOJu0YxiAAcMw1hIE6L++aORY+wqUvm8s8MEdIvCPmgyl6QHfc/zOVCr Imx+HP5hY1at+r/5GsGBRkfaJQRoLzVbVXhvNmAOA6cP5AncgZcdOiC2Xh8FG0g= X-Google-Smtp-Source: AGHT+IGfovdnAqYWOwtqmXfs1YlWNLytry27KoN7DkkE+JMDdDN0epVDte/LII/bTeQGg3HedxA6ow== 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> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 --- 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;