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) From patchwork Thu Sep 12 16:11:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 13802327 Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) (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 BAB9413D8AC for ; Thu, 12 Sep 2024 16:12:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726157529; cv=none; b=iYnjLxvvhaNqHOkBf4HULW+9HbUplX1w+zAX034O8oQ8G5uTJ9xg5ufEyzkTrUvaQ6DNMK/J0zGIRiKpTGSBM6DR5nu+FRuEqPh2LcRiMyfO5oikA/OJxy4KDVt9pQr1ygr56KERtJkrZBa3BJ9KT1gBsuAhMPZizO9AuUk3BcI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726157529; c=relaxed/simple; bh=NT0bzYtCC79RMKqpRvOxbXK6zhmx5cfv0BdXvkVUgVM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=juPGu7yfv93cEJ/jSHao1i6lKRJNkiKaCznQjXB+4FMJJwiOi9iES/TSKyR51NgnBjcvyx3wIOq6CkoQvPxMp8GAbizJdwjoqCw0QuZlgVb7z+fy0gII0p03Q5iO7inNcMysqcrd6sHeVwaHUIWOmogvH2Y7sdjNkJNH1v1V0eA= 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=viEUtg0C; arc=none smtp.client-ip=209.85.216.50 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="viEUtg0C" Received: by mail-pj1-f50.google.com with SMTP id 98e67ed59e1d1-2d8a54f1250so826663a91.0 for ; Thu, 12 Sep 2024 09:12:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1726157527; x=1726762327; 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=qewOobu1vObZbuzJ+iuWYysDqS1YnBarNPQM9eHAdiY=; b=viEUtg0CGfEfkkdMM9Dfpz/AWwZKGFxN793ieQ2xq/FaD+pqgYJsO0cDBi8UcorMe1 cSm2yrspddxcn0YlDlaoXIGMXBNwAsGz4a0VWo8nu1lKizh47Yagxj25LKekHHjAeQ0r D2u4UvMU89BomNRGfNA+uvbmnmaCKzzxzU/Tpf8BkiujdCt3SHtWIy+F2nNMgSaKXz4L BFFqWIrEJBxPMiAmZ8+MggnFTTUQphbBdSNEoXs5FGE/94ZR27Wf/pmomuLnqTadGH5I umWHaoDVoiUCzjdtA/sQrn/sZFRBP866QEWA/Plz+U6lYnN6VC3UOuc6njC4tMu+zmjt zPAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726157527; x=1726762327; 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=qewOobu1vObZbuzJ+iuWYysDqS1YnBarNPQM9eHAdiY=; b=ff4UmKMPbhdCCiqDH0+4SRmAeXgmmLk5PwfdDTR1wXh0Uea+4iY4UCt/v7rHVY/C6w 7YMCnhnM8xxFuVycIT7n4tgoXCOL3F9iwN7QIIUu3NbEXLz6Yc5zutxxJ1qkpsh6tL6S Adwg3i7t5KRISx9pp2ZRqwAXTrhlSnrhYvNtImVdbDIjvHMPjUYXBAD3tQLympvcBGS3 FmSVLuMp0lg1ZjOBdcekGxaRaZNbV05gfu2JRLVx0dZiVSiMzZ2KRPKNXkNpfialnd0M 7PIn68Pj8IzaCEH1ReKdiJMG6xgzwDSN91WhMfpr+KxxmzrHwbkUA5dyDfWSDRS8m6SI q4kg== X-Forwarded-Encrypted: i=1; AJvYcCW6IjGaiHEEr0VfaIp+LzpGgsiFs+TFpHRX44XSXsKZZTZFFuwkYXzMTEfhk4tLolQDOKY=@vger.kernel.org X-Gm-Message-State: AOJu0YyzFbdywbnT7YM/I2V1IBWNZ424DUvL9bUV81PQLF6+uRRPmIbh W7zwKfuy+abwF9Jk3S3rQJQuFSsc0TaKFDBoPbzZDbBpuk01M/ezxbLmj4PE2UY= X-Google-Smtp-Source: AGHT+IGfJHrcD4FeIRzLtjG1yF8QBxXB5+wVdXyMPyemp6yKvRgw1X8BWW7xKjm04CE0VvSJxj+cTg== X-Received: by 2002:a17:90a:2f64:b0:2d3:ce76:4af2 with SMTP id 98e67ed59e1d1-2db9ffee48amr3456585a91.18.1726157526967; Thu, 12 Sep 2024 09:12:06 -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.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Sep 2024 09:12:06 -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 45/48] qobject: remove return after g_assert_not_reached() Date: Thu, 12 Sep 2024 09:11:47 -0700 Message-Id: <20240912161150.483515-2-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240912161150.483515-1-pierrick.bouvier@linaro.org> References: <20240912161150.483515-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 --- qobject/qnum.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/qobject/qnum.c b/qobject/qnum.c index 2138b563a9f..dd8ea495655 100644 --- a/qobject/qnum.c +++ b/qobject/qnum.c @@ -86,7 +86,6 @@ bool qnum_get_try_int(const QNum *qn, int64_t *val) } g_assert_not_reached(); - return false; } /** @@ -124,7 +123,6 @@ bool qnum_get_try_uint(const QNum *qn, uint64_t *val) } g_assert_not_reached(); - return false; } /** @@ -157,7 +155,6 @@ double qnum_get_double(QNum *qn) } g_assert_not_reached(); - return 0.0; } char *qnum_to_string(QNum *qn) @@ -173,7 +170,6 @@ char *qnum_to_string(QNum *qn) } g_assert_not_reached(); - return NULL; } /** From patchwork Thu Sep 12 16:11:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 13802328 Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) (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 C749113D8AC for ; Thu, 12 Sep 2024 16:12:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726157532; cv=none; b=YdQpVK1DdMdQjqYfU8uTFR78u9n+QQW5vpzOc3O8bFASJxUV9YkkAKfp337izQUEXBFHhbf71ymieWPSrCU0auLnfQlNuIHHEIES309X1aW4Boo2zlIfehQlG1R2+2uoMBNg2YB+TxPkMGahHcKgyPfD6+cY3MbUNMElRIQLHH0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726157532; c=relaxed/simple; bh=a+M3PQ+pupAOpsAgt31slutK73YbnjzT4KrN/6Hu0+o=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=VBM12JbNbIumGcdjxL/bBh4w7HAb32HEeO3dZZHxA8EMYLLfSqMv0LMqhDSHgWjCv5DvdQw34XYZa4SBgkpZejtDEmpX40RvcWzvq3YGT+R0Zk1Ty+hlgiIEDZ/qEP442iZ85KV4GcDscoMWH8yy6rjiTMsUFjRqC3ugHpZxQ3Y= 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=su7CljiC; arc=none smtp.client-ip=209.85.216.52 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="su7CljiC" Received: by mail-pj1-f52.google.com with SMTP id 98e67ed59e1d1-2d8abac30ddso980807a91.0 for ; Thu, 12 Sep 2024 09:12:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1726157530; x=1726762330; 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=BppHFYoQrx4qC3DO9Sb1ugevP84fPlKPBSZdTDngGiU=; b=su7CljiCwW/1H9Bp2DLjBuaTW7F1vtcl0FGO423sZ31K0pER6HFWYl4PWkjrpUL1OC mQmzGQxSo5J4BHQReAa8LpswvXqLa/mE8Rd2CqxkJqmvPYa+OpGvS+pe92ISaaVdjOIF wGpC1jmBMD4iRwf4SPRew7PRAkaWA5iiye0sot5U4pdK42bIeweZT4sE6isZ2wlCODet hOELUIP1m0BisTPnlRkIn/Eodr6YQLahyxdF2h8AvK9BWepL9aoaqljY2q/8yYOl7vzc gTo+enqgB1tBNu8MtgQjt894D1z+sh1g0l+/dpAbgCajMgOAZGnv2mpzPfUyA0fYRRFv ETgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726157530; x=1726762330; 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=BppHFYoQrx4qC3DO9Sb1ugevP84fPlKPBSZdTDngGiU=; b=bT5ixtxTssSCMjLxKtvLBYKgj3lRlY1xrcQ7NAH8c/6/pmFgJo6GTNTVPqxuITpLac 4T3JJlSYd4niuJJ6jhxo/UgN34xKmVyn5IFSfLJfaRH/to4JLCWrzVmUOyOHvhG4cU0S 2rN6kmv8dg82oWGPn35j9NCTldAhhCsRXp7eQh0YFbjwvWRhkoPCDeKlolIJ8zSOFCbp 3pD8n9RS0spCJWYh74fmyX6A9Idb5/2rw9sGz3U5kEYsRcBF8S0awYtLK/7r6MDW7pAU NpjQzicpQk23ji2j/WDZclJ7yrLLNtREGl3cw1W/JP/QZafBfNh2nFSW2LPRm/Q9BKdV p2yw== X-Forwarded-Encrypted: i=1; AJvYcCVQX4n0Mc/8wnyU1P4FqLUHzWTlEa08UYEJ4Xv8AaAPRotqd3az37GSvSGCVvbw0dOWQzw=@vger.kernel.org X-Gm-Message-State: AOJu0YzTsOJL2w5Vu3qIo1gnKFrskDJlMqb1kQH3YMFi0LBr1oqELVdX SH8mpYNMrZb89TAmRUmZmt2LNK8Raffnogw8CW+i5sSlEQk7g6948dSskdYlEto= X-Google-Smtp-Source: AGHT+IFXZnFHApOhxp7HbQT8QxnSQy+ag97AShW2GHgmcSAhB2K9e6P9OwzQbkNk0mR6Kpm6KHVR+g== X-Received: by 2002:a17:90b:4b48:b0:2d1:bf4b:4a6d with SMTP id 98e67ed59e1d1-2db9ffa1590mr3873451a91.1.1726157529892; Thu, 12 Sep 2024 09:12:09 -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.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Sep 2024 09:12:09 -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 46/48] qom: remove return after g_assert_not_reached() Date: Thu, 12 Sep 2024 09:11:48 -0700 Message-Id: <20240912161150.483515-3-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240912161150.483515-1-pierrick.bouvier@linaro.org> References: <20240912161150.483515-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 --- qom/object.c | 1 - 1 file changed, 1 deletion(-) diff --git a/qom/object.c b/qom/object.c index 157a45c5f8b..28c5b66eab5 100644 --- a/qom/object.c +++ b/qom/object.c @@ -2079,7 +2079,6 @@ const char *object_get_canonical_path_component(const Object *obj) /* obj had a parent but was not a child, should never happen */ g_assert_not_reached(); - return NULL; } char *object_get_canonical_path(const Object *obj) From patchwork Thu Sep 12 16:11:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 13802329 Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) (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 02BD1148300 for ; Thu, 12 Sep 2024 16:12:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726157534; cv=none; b=j5GmgGKdFJdGyzh8ZANqJn0asV+CpADCWHuCjLFkX0O8fG3Tk4y2hqJ5rdA+vjjBb/8fVAnu8/az7CwCp+p5y5vVS5rppHLS7Ihu0bE+AERzYKmW6kTqFbiJW+H/l/Sn333my54JYcvPRY6HmalBtpq8sGg4b8+wJUxx414FwSg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726157534; c=relaxed/simple; bh=7ePZGISZjz4seQJioMzifLb68u9zgTlI1DyF+ig+7UY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=AxiUAMkrjPkJ6SjvyfWpoZM8VajQFLv4+LIAd0ULQ0bQaxf2o5PRSrt8wLc80Ini8VG1dP1UcQdTwLn2xOjve0UtSiPH15VY8BRJxjtO4cnlBmyVXOd6DXaWKNKcd62I+1u3MgQFPEzRnUdw8YCicx/QNWstnP+SdjipQLUGFjY= 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=xE32lnYH; arc=none smtp.client-ip=209.85.215.178 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="xE32lnYH" Received: by mail-pg1-f178.google.com with SMTP id 41be03b00d2f7-7db299608e7so475336a12.1 for ; Thu, 12 Sep 2024 09:12:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1726157532; x=1726762332; 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=I2RDX2fjFJQRiytlapcKfuKzsswRML3AeBvlkH5UKQw=; b=xE32lnYH6r7HTQ9dl6EpjeaO6RT9S8QzrcbKjdvS7s+OeJAmKQiIReXsUm+P/e/Og2 5MT027i2ubayceKnwdKiywD1FYl99dhCLJGlOIsAgXAzJXsLccOL90Sfg+gnYY7NOxg7 BjjbsS/gZnpSqj74sFSd1DsmGgidTYcDRzACjYCMEYbtyjmCoXV4dIxzyiiatEQKNgWW 7x1kyC2LbKJKgVR4ZaP9GX5iph+xvKTc39xm4sCfokianNMSxFXEHeC/0Q5GyO4KqgIE ljXn5E1z6i6Ytvmg1Aa4EksMiYcpRXQIejVRGjjphBU5lIjc+RmKjZgwBHEtKuglwffX g+xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726157532; x=1726762332; 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=I2RDX2fjFJQRiytlapcKfuKzsswRML3AeBvlkH5UKQw=; b=TdiIGgysq53Fk0ZGmH0JJafKTnGEUu60pYCTI9H4TIRHW8zwHg6x9Q9zuU98eyycgl 82BbNohCgm9kF1QtndqZfv0cmR86C7d4FNLwYI6Z0Mql+pLGxDdmA7dymJ77OQD4/SgR BySNAJB6GbuM/EPL0I0Mot6K2c1HHiIroYx5JhWVK22hVLWGk+NqXnWfjlXoAbw7rhdf FjddkFXTjfAwalP2uQPK0tTTW29hbRmwtGMDt58PAV5WLSG9GZSIo91N4su5Woebis9Q UbXTaN95+cYh0l5XPKIowignSH69AnvbBq9biB4XiQosLPlkuz5bIfcUsDQUd2KYIGP+ rZig== X-Forwarded-Encrypted: i=1; AJvYcCVJZTUsm6MWb02qu6Ec1o+EuJJMFfs0DhR4VfC8/xBaQLsvHYrMsY6k4d1cOrkAZW8qQ4k=@vger.kernel.org X-Gm-Message-State: AOJu0YxOJ4EyHcY/dwrzEumkEgJp+qTt5sOql+xYK2JWjCvfGKu6OkSX BRyhmhgLU0ubMOqyuAS6FXmbEMSfHl8ZKrcVFSPqTjYAfMge9gLs2NHEPMQNsgM= X-Google-Smtp-Source: AGHT+IGK4aCZmCNuEDtLotPImMG0hqQX92keeNScArTDh0uI/me/xdlfLavv9yxHnNep1l1nzhsFEw== X-Received: by 2002:a17:903:2285:b0:205:2a59:a28c with SMTP id d9443c01a7336-2076e3155demr54911595ad.1.1726157532316; Thu, 12 Sep 2024 09:12:12 -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.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Sep 2024 09:12:11 -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 47/48] tests/qtest: remove return after g_assert_not_reached() Date: Thu, 12 Sep 2024 09:11:49 -0700 Message-Id: <20240912161150.483515-4-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240912161150.483515-1-pierrick.bouvier@linaro.org> References: <20240912161150.483515-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 --- tests/qtest/acpi-utils.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/qtest/acpi-utils.c b/tests/qtest/acpi-utils.c index 673fc975862..9dc24fbe5a0 100644 --- a/tests/qtest/acpi-utils.c +++ b/tests/qtest/acpi-utils.c @@ -156,5 +156,4 @@ uint64_t acpi_find_rsdp_address_uefi(QTestState *qts, uint64_t start, g_usleep(TEST_DELAY); } g_assert_not_reached(); - return 0; } From patchwork Thu Sep 12 16:11: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: 13802330 Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) (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 C0A9714F12D for ; Thu, 12 Sep 2024 16:12:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726157537; cv=none; b=NWgwEHpUCyUKo+UBAZtb1934zMbE2iZO258CkRjV+FgiZk6uKVuHdoFE+BbyFR8eNNAH/scf30DQATZJrZNqCUA34E5jsVNLy4hJSoeUC9hYbCDQ9G6L9hT27PpaD3AUIIjhhHmafg6tr7mk3pLr+dm3ExTq0Bk7Hry29Q9jqkA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726157537; c=relaxed/simple; bh=rx8KXXnabdEWKAYTTAH01K2wRN2Cx2fddQlG8cTW25Y=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=TTxHypB/9zjLCdODcUV8scX5hf6pOx8uTBMPRHI6hpNldldCr+U3/02k5fXRwai48DVGJsqISZqoulv7wLAzfqD/77YaPE+a684Z4v8DRXTZToj/4r+VA0BZZ7mfi4lHrT8ODLAVZ3kjFbaAEl7z2CF7l6Axwsxr+kzDm5Ws97s= 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=qH2ZRfku; arc=none smtp.client-ip=209.85.216.43 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="qH2ZRfku" Received: by mail-pj1-f43.google.com with SMTP id 98e67ed59e1d1-2da55ea8163so849979a91.1 for ; Thu, 12 Sep 2024 09:12:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1726157535; x=1726762335; 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=HWN+Oy9HOzHEP1zqC69VZ8fDvc5xR6kboU5Mz4xPMnU=; b=qH2ZRfkunv+sbpfEekljae3ciUpZ01T0xY37z/a1jDVgKrUZTWQBJ9Erc5xUXO7flk c7snGSMabqtyG07N4NsXfBQ/iMV3EkyOaP8aHRX4TfX2pYzlr3TTIam8xgl6caIJQ6mC McTqzZcAUoNryKdzAShwBI5Wp3i0PCnjX9GI0BFSw/x4SXDom/r+bKK+USxpGY5HPn33 PSxEuePYvRqMcizPc30TzRTJWSXzCIEkVb615GUZMuInWC84hpFo96E+e22z7QzlmFgr wGhms5ZowSjgNzuGn7YDd01KQcGVHvAsdmzRsBJJgghQuJXbFBYrcUGyViPpZTrJGUZT aaXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726157535; x=1726762335; 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=HWN+Oy9HOzHEP1zqC69VZ8fDvc5xR6kboU5Mz4xPMnU=; b=HY1492+9AOReQ8+97sPVBP7L97oliK+JoLNqI8C/VeEIr087j4nLMikpjeX+qZoVwp b97D5Sayye7lF5Tj5sab0byxHYTc5uBnwlMYE64Y7syfVgV+nMy+RyDjtKA0G/L8NH79 aVKWvTtMPRkVwcQZTtQRBuDteiSXLhCaxX4pVjjQkMqX47mZfLsisyYbVR4+PXO6YSw+ dU8lCDpg1V71zBtyz21N86eKKCAzrsYUPgF7NtxXd1kEBfSA1sXntRH/6wzFBw9ICkxZ 8/zS75c87sUgA9sct4pPWT0YLYi1KjMsN5rZeB/ETXCVwjm/heWMFs8QY4/kvI8aAPSA TLnQ== X-Forwarded-Encrypted: i=1; AJvYcCWARQjtl/Q+xaNUGsh1bkw1zBQ1H9zTr2oerKa9xl+Yr34nWOVfz0dyQQig60VsLBjojaU=@vger.kernel.org X-Gm-Message-State: AOJu0YyiAdyeEo8MxXEL+3Mh/DC/0eqelm9U79u0d3aRmXVYu9hAOsbc o7SmWr8IcOSAd7Pe+i2b8dy9CD7Nh/ZiNilDlBCw4fwxfOLy3fFm2JX4NTiUJqM= X-Google-Smtp-Source: AGHT+IEudqjJEaJGfdkYpDawDooI9CPu9lOGv3V8EFCc9McG20NJHsadE1XKePiqdhT+Fnpsv3OOxg== X-Received: by 2002:a17:90b:4c41:b0:2c9:3370:56e3 with SMTP id 98e67ed59e1d1-2dba008304amr3540812a91.34.1726157534900; Thu, 12 Sep 2024 09:12:14 -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.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Sep 2024 09:12:14 -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 48/48] scripts/checkpatch.pl: emit error when using assert(false) Date: Thu, 12 Sep 2024 09:11:50 -0700 Message-Id: <20240912161150.483515-5-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240912161150.483515-1-pierrick.bouvier@linaro.org> References: <20240912161150.483515-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. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- scripts/checkpatch.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 65b6f46f905..fa9c12230eb 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3102,6 +3102,9 @@ sub process { if ($line =~ /\b(g_)?assert\(0\)/) { ERROR("use g_assert_not_reached() instead of assert(0)\n" . $herecurr); } + if ($line =~ /\b(g_)?assert\(false\)/) { + ERROR("use g_assert_not_reached() instead of assert(false)\n" . $herecurr); + } if ($line =~ /\bstrerrorname_np\(/) { ERROR("use strerror() instead of strerrorname_np()\n" . $herecurr); }