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: 13802326 Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) (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 4E4B8126BEC for ; Thu, 12 Sep 2024 16:12:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726157526; cv=none; b=Misncd1yHfv4deP8/ecmfUpTuSXlX7RIwckc4s/r1hFyxwf1Z+s6A1HnTMdyn8OYFC6GwDtmzJvOUay9ykQxQXMVyDtM+eHCuWNmafELoFTZt8Z1EXqa0xiF3T14lOA7Zmd0Ve//0OWKSbVswXAOuDVlLBoGHJpga+IcF59rG/Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726157526; c=relaxed/simple; bh=BlB4UzGkquPkpiupe8sFTskFHJexnWNxa2gDl1EEGLQ=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=BLLRcVH0rDwV6vjptiI15mjx0Wm40HDQd5B7HGFv7D0FH826VRKecJWSps4ELpApnZS1r+wuu5tKImGHEupraDfzt1rEN5hfIOSBXsKki5AkUl67j5hADxS3/E79Ogqee1F4SlJwgLHzOxP4/mgl3P2X2pXNIeweoV0fOpcdwPM= 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=QrcsjvRn; arc=none smtp.client-ip=209.85.216.41 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="QrcsjvRn" Received: by mail-pj1-f41.google.com with SMTP id 98e67ed59e1d1-2d877dab61fso15751a91.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=vger.kernel.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=QrcsjvRnaq4emvI78UWRkYa++k+uQmgq8O69ctYFfG6fg+wU4+HUMYRNwWGo8KjVlT s8hniWfyWiiMIG0IGwjcNJKyZeCY0/EJIdVMGtzZCQDrpDfetJThv2tDi6uow3lJe+lb x0uTMhH8FqvMMdhBLT64fQJW/r5kjzSzsy4u+tnI3F/A9OGktj0TM4Z6buM6ImT/tVzi wKTz/CpmCHmnwBft7By761Ay2MTTl9bXe9F7ROdPcqTS+VsyBMwpHUVROY/duM946jIh X49zlYLjdu/Ac3js/wiOdZdZzcoT6rQsIJCEHJ3hgXXVOtFeJ1k2FvdC7yJpyQxCxY8E /IFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726157525; x=1726762325; 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=JAa7byU2IODLjjXQZUTwtIrkF9f0okOO41hToQ4a5Wm7hLI37o7mfpGIwGW4CDlkLE 026JESehDoDe9NbRc232PH6rjYHFOFx9Jc/4P7ARtUBrY3r8j8NJJxgK3xB/n2qUFjI8 OwFeV+X5IGWC2JTJoWr00L0LHXEpexv5qL0v/+Rtpn1VaPai2XClOubxWSi+q/xo085I IHImp8IZXPGOpF5kgy+KBBC1q8YQxKrx0DCqbBVNsHUao5CjUA6ZnY+Ljea1Q3tWLIni /DYtE0NdwcfgTeqOkuoUkyw89+7tqCMjEYgEjYC165Sj7TLXDo9jYGQf/JLwcNCgA4b3 IYyw== X-Forwarded-Encrypted: i=1; AJvYcCWYVdf+iUjUugVdr9VUsIPCIR+GlC0lJcMQSxBH2toPMxUz3z1z+AU+txv9dZxsmlAsqqQ=@vger.kernel.org X-Gm-Message-State: AOJu0Yz3XizzyDPqaRlqfAwaT8sNpgZG96skLjn/ZHmsdl97YFa5/yEt BVJTZ38luWThDdc/Zp99onH1/7jhHPsdohYzFCNs0jvgFFVvIPF51/jU/GAh00o= X-Google-Smtp-Source: AGHT+IH3CkARGmsVrMtj/+IMTS0f8rigieK5Yd9oJ8RDmtHm7l5KLlEuNod9V4EkxnpZeL5wBcsOHA== 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 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 --- 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)