From patchwork Thu Sep 12 16:11:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 827835 Delivered-To: patch@linaro.org Received: by 2002:adf:ab1c:0:b0:367:895a:4699 with SMTP id q28csp1358708wrc; Thu, 12 Sep 2024 09:12:54 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUsSVMpyonCjHwrOevIr92bdXwoQ3L3K4XKjbdt4m1IXv7gUZw+AwdD1WuDPnhJVTCtBFh9mA==@linaro.org X-Google-Smtp-Source: AGHT+IEhu8CEi25Nq8xULY+x3NG7V68rXCAFhZzWdRquXa1+YwwIa4nfqQr6O30oywZi40sCcY7q X-Received: by 2002:a05:6214:4a81:b0:6c5:4109:9b8b with SMTP id 6a1803df08f44-6c5734fc2a2mr61458076d6.6.1726157573796; Thu, 12 Sep 2024 09:12:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726157573; cv=none; d=google.com; s=arc-20240605; b=IseDxFI8ARtbwWL1us3UVsFN4+NdlesBMj2SrEcfmcXd5y32YLYhXm+dnU7ECNvKi5 1F+GGJJZYUIg/lsdS+3Jt8pE7Vu/TSEHa0j1mlLZ0GkfqLhoNbVU5jgJNqUQyaio8ahm urMpsY8znA5cFis53qmOkyw/MQylUjH6rQxZwJK6DJzWE9ATPmQnQi5O39tOtRCwBP4d /VJUH/I/qAv1UYj5it384HTyrGUDJ9OTeKbD7MkXNy1d0RfmcZSNsZW8RYtllXtq2n1O klz6A3omWpc6PtlDFx+NE2z+sgmYR1m4iVXLDXOE2CJlNBxtEKvR3jOW/qO1KtfcUA6s SNyg== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=mKjZY38PTxGYr/WbE7V7KdYaVqXpGoHwAiqL2NqOWqw=; fh=ujiE8HSy6YTG7a3Z7CGLGec891YtQfFM1W/0TkY2zUo=; b=iV3h/Mi/YMNZ5UaTSQwiqNqd2jsnEaRdPhetl/S0F5wOZI4soSUsuypeRvdwjtgKaY yv8GV35N6h6jMBc/nsUxdH3H2m1kBXY+6t1bWEcgapP5kdYhfkhUeT9g7ro2orTAhHh0 r53y8PxZ1Ii0ykZDGA1yTGmjUD/T4ocOlWZ+xQ+aosMuXUMyIe9TOQ8wnFdJ+YMV1HtL /mRqBj5sozKur9nLPAk2Z1wemrRaper+9nseQZPir5ByPo2FLgH+FnenWs3i6Oa70HKz WEDWjXeRUy2tccGNohrcNyEXYJVjuvIV0e6h1XQIbi0aUJBznTCchq/EBq1DFrE7TFxm 88+A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ppn3uFL2; 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-45822e62e11si127659171cf.70.2024.09.12.09.12.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Sep 2024 09:12: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=Ppn3uFL2; 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 1somQV-0000Uw-Q7; Thu, 12 Sep 2024 12:12:11 -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 1somQS-00008G-CU for qemu-devel@nongnu.org; Thu, 12 Sep 2024 12:12:09 -0400 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1somQQ-0007QP-7T for qemu-devel@nongnu.org; Thu, 12 Sep 2024 12:12:08 -0400 Received: by mail-pj1-x1030.google.com with SMTP id 98e67ed59e1d1-2d877dab61fso15746a91.3 for ; Thu, 12 Sep 2024 09:12:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1726157524; x=1726762324; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=mKjZY38PTxGYr/WbE7V7KdYaVqXpGoHwAiqL2NqOWqw=; b=Ppn3uFL2XJz/kA0VUuTZcp7JGu6QKcQ1hhyJbJ4404B54hTqPsQ/+OioBemnzFzL2H V8wBRE4u8iOMSmj7auBewFq1GV68mPs4gBwaC4nOZ7A+LxrdHT7qcd4NxwRp4MeuYnXT j+nbCycMp15vOJZkWdj9bkI0OjRF/Xx2/A8UJZqQBJXGk2Tg4aFZJvTcxee7LjDd19QW iUs0VJzMHr+DavncZtIHelBLH6fZ/LOCgoucGkwkav9WEbVMVklM//Lbb6K5IXpXzYfY GWpkBsOWiHu372BZt3njsx1pG064BzpmrZLWvU+OfdbgqkBXO10Qm+V89Low36uuYgyt FSQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726157524; x=1726762324; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=mKjZY38PTxGYr/WbE7V7KdYaVqXpGoHwAiqL2NqOWqw=; b=hm1HqMtCtFzk02/t/ibnb1+UpZX+TuLV1hC/5urhl6FrRAXBzbOwBD2c+5sskAYkKf 4MlGdCaUAUcyOBBjshV40zj+237UoPAk25XNc2nw8CyLv3iFPLAbNkFmmfLsAn4BxMlq WmrMM/LIDbcmkrZQYs7Em3FQ06zTG/z20A4PFGtmtloeFgkKpFedpVw40pOBH7271mZl kzPfcAng8T6Yh8KwdDDgWSJXYnwDqV3ml61q6dgDfzm086U9nPVtzKr9qRVISisc1myF +AN9LfcF3BnEydmXQmNk72XnlUIsSZd3rk5bDkmnmjl1wyobLAzM0sZEWjkMWUSCtLbH LJZQ== X-Gm-Message-State: AOJu0YzQItTZHVAu/hvzdyaiaUmjkDDdNcgTbOjLkqsDhTddjihv6dvd dNg694bYiJZUzb4Fgsvx59oAvntqdr8U7TxXpeXjuXKHMZjUAbzu1KTfF6b04G5AvlvzW/vvg6d Pl9pzKZO3 X-Received: by 2002:a17:90a:9ad:b0:2da:5289:89a2 with SMTP id 98e67ed59e1d1-2dba0092438mr3361278a91.41.1726157524497; Thu, 12 Sep 2024 09:12:04 -0700 (PDT) Received: from linaro.vn.shawcable.net ([2604:3d08:9384:1d00::9633]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2db0419aab4sm10868139a91.15.2024.09.12.09.12.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Sep 2024 09:12:04 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Nicholas Piggin , Igor Mammedov , Akihiko Odaki , Weiwei Li , "Maciej S. Szmigiero" , qemu-s390x@nongnu.org, Michael Rolnik , Liu Zhiwei , =?utf-8?q?Daniel_P=2E_Berrang?= =?utf-8?q?=C3=A9?= , Palmer Dabbelt , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Nina Schoetterl-Glausch , Yanan Wang , Marcel Apfelbaum , Dmitry Fleytman , Stefan Berger , Halil Pasic , Paolo Bonzini , Laurent Vivier , Daniel Henrique Barboza , =?utf-8?q?Marc-Andr=C3=A9_?= =?utf-8?q?Lureau?= , kvm@vger.kernel.org, Joel Stanley , qemu-riscv@nongnu.org, Aurelien Jarno , Fabiano Rosas , Eduardo Habkost , Harsh Prateek Bora , Peter Xu , Hyman Huang , Rob Herring , Peter Maydell , Kevin Wolf , Marcelo Tosatti , Eric Farman , Helge Deller , Jesper Devantier , Daniel Henrique Barboza , Fam Zheng , Klaus Jensen , Keith Busch , Zhao Liu , qemu-ppc@nongnu.org, Jean-Christophe Dubois , Christian Borntraeger , David Gibson , WANG Xuerui , Laurent Vivier , Richard Henderson , Markus Armbruster , Sriram Yagnaraman , Bin Meng , Ani Sinha , qemu-block@nongnu.org, qemu-arm@nongnu.org, Thomas Huth , Jason Wang , "Richard W.M. Jones" , "Michael S. Tsirkin" , Hanna Reitz , Corey Minyard , Alistair Francis , Pierrick Bouvier Subject: [PATCH v2 44/48] migration: remove return after g_assert_not_reached() Date: Thu, 12 Sep 2024 09:11:46 -0700 Message-Id: <20240912161150.483515-1-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1030; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pj1-x1030.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 --- migration/dirtyrate.c | 1 - migration/postcopy-ram.c | 7 ------- migration/ram.c | 2 -- 3 files changed, 10 deletions(-) diff --git a/migration/dirtyrate.c b/migration/dirtyrate.c index c03b13b624f..5478d58de36 100644 --- a/migration/dirtyrate.c +++ b/migration/dirtyrate.c @@ -229,7 +229,6 @@ static int time_unit_to_power(TimeUnit time_unit) return -3; default: g_assert_not_reached(); - return 0; } } diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c index f431bbc0d4f..0fe9d83d44a 100644 --- a/migration/postcopy-ram.c +++ b/migration/postcopy-ram.c @@ -1412,40 +1412,34 @@ int postcopy_ram_incoming_init(MigrationIncomingState *mis) int postcopy_ram_incoming_cleanup(MigrationIncomingState *mis) { g_assert_not_reached(); - return -1; } int postcopy_ram_prepare_discard(MigrationIncomingState *mis) { g_assert_not_reached(); - return -1; } int postcopy_request_shared_page(struct PostCopyFD *pcfd, RAMBlock *rb, uint64_t client_addr, uint64_t rb_offset) { g_assert_not_reached(); - return -1; } int postcopy_ram_incoming_setup(MigrationIncomingState *mis) { g_assert_not_reached(); - return -1; } int postcopy_place_page(MigrationIncomingState *mis, void *host, void *from, RAMBlock *rb) { g_assert_not_reached(); - return -1; } int postcopy_place_page_zero(MigrationIncomingState *mis, void *host, RAMBlock *rb) { g_assert_not_reached(); - return -1; } int postcopy_wake_shared(struct PostCopyFD *pcfd, @@ -1453,7 +1447,6 @@ int postcopy_wake_shared(struct PostCopyFD *pcfd, RAMBlock *rb) { g_assert_not_reached(); - return -1; } #endif diff --git a/migration/ram.c b/migration/ram.c index 0aa5d347439..81eda2736a9 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -1766,13 +1766,11 @@ bool ram_write_tracking_available(void) bool ram_write_tracking_compatible(void) { g_assert_not_reached(); - return false; } int ram_write_tracking_start(void) { g_assert_not_reached(); - return -1; } void ram_write_tracking_stop(void)