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) 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: 827838 Delivered-To: patch@linaro.org Received: by 2002:adf:ab1c:0:b0:367:895a:4699 with SMTP id q28csp1359062wrc; Thu, 12 Sep 2024 09:13:38 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVZ2nKFOmUSSKHaESVzry70h2fRrzto1eyfE61WCOnsI3Nzf73xHq/Pxydm1j2Sb3M1ExnkmA==@linaro.org X-Google-Smtp-Source: AGHT+IHIk6pIUfQqusjk9CTy/cHAliz0owFv03xMHSCvlvvP88ukLIcOrvl1kgtMub2OR6t3gY+N X-Received: by 2002:a05:620a:248b:b0:7a9:bc1c:10b9 with SMTP id af79cd13be357-7a9e5f1fd36mr543939685a.33.1726157617911; Thu, 12 Sep 2024 09:13:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726157617; cv=none; d=google.com; s=arc-20240605; b=gzn6xlIEq+jt8Bw8wxl0QBiV7ncZMSGk2QGOjOB65jWg/g4iYAN7FA0fjOemiGzFYP NzzaagUTr283meOtFFxIJeI0uIdf4kpSch6DNEoX3q5B9oxFxkabcttAf92jN0b6poBy itSc5g7H9NWDUzEC3Puw9NLcs77NEl4vLfQpORs4F8xaC0P0UaaEFbojlKrarMjx8Uo4 s2m8McVZ4n49kjTBaxZAttOcHFqt0O8mOlOLmwNMwjmJEVKohr/HzuD692mGE6X7lv4B FY/j9wHj7oW89d9k0EYzUS/21x3xudOQsaC3yV7S0qW3fxpJ/paf2vBn/wdLfmpgpa6a vYvw== 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=qewOobu1vObZbuzJ+iuWYysDqS1YnBarNPQM9eHAdiY=; fh=ujiE8HSy6YTG7a3Z7CGLGec891YtQfFM1W/0TkY2zUo=; b=Fzp6jvB/POZBqwxIe5yxK6+CX90OzT3Y4/MhaIMNbZLz3adpTpPQdeTSkQCKq3vo0S iAxb186Pjuii2OeQ9g2IT8fgjHJwA6RmyuCoR/j6bLOxuh6jxciQv03lyp2D+ZceI3pu QxM420eUXBFKlfVoys59PbLGWCoccSIU0WEYSNU1M8/z/hryivRlUhvqsd4U/iP4lItB tKSpRaba25/F0RIOaHOrwDKFy9dFEDi98Hr9n5xgzju3wiz1rSc5NzHESa2+9MAOInEh Lgg/bqipqh3mRJm9LAfzDUgJQf2PDRHzT9vxzF56XOS+2H+/0gqUSoQ9SzC5+pC6pqxF tsUg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="b2mbY4/l"; 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 af79cd13be357-7a9a79c4f80si1326564085a.90.2024.09.12.09.13.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Sep 2024 09:13:37 -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="b2mbY4/l"; 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 1somQX-0000fq-Fj; Thu, 12 Sep 2024 12:12:13 -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 1somQU-0000OH-UG for qemu-devel@nongnu.org; Thu, 12 Sep 2024 12:12:10 -0400 Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1somQS-0007Rl-KD for qemu-devel@nongnu.org; Thu, 12 Sep 2024 12:12:10 -0400 Received: by mail-pj1-x1031.google.com with SMTP id 98e67ed59e1d1-2db89fb53f9so812249a91.3 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=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=qewOobu1vObZbuzJ+iuWYysDqS1YnBarNPQM9eHAdiY=; b=b2mbY4/lvd8nQhUsvPSDV2BdbE2nYtPINuzKz9JeMt7+YEtM32gLH2fYfBeUksgubD RnGKpIBVcsJZlrW6d/0YVm0GXrp0b7IujPRaeMNxonM+bqIdOYPqjIebffZz+mrilPYn Jd/5g4x0+1yp3/IQ+5IhlKeufNG9fpBBLSwjG/UEqJNJRfkIXuafnEpvNRjY0b9NDeur il4HsBFybko+8A6B6cealurtyEhs/AuQ8GYtgCI8pzAoORYANg1RYYkJAhRAxkRv0u3i jH0Jfd1c8Qn2xsw5N6FWSf6zlD1YHUe9zaNkoqg+R3vw8BRmZxsHrdW8nC5n1QW9k0E4 h5yw== 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=ldpr7eH5E3X88zItqFwA3oGLIdl4qH/y6wOxumxcDgLDPRcNZLicTTEZEeCnImztsp QDSyLLB6aKMID8iBr/37izSi1A+6S1LV+7jo7pgZcqYprL7kTck3TW/98jvrhAJ2wQY+ zMY1lMlfE/wWusNvP0lfgi7AvJKHUkCEBQD9GFZey9OXzR8lOLqAnkMoX/c488AuAZNt VwuvlZr5BuWWyv2/Re20XHaysmNaVAqF9PKdWj15UOCDvqa4t+OIeY59nB16b8Xriwns PCfawvUeZv/bmMGeDhA2Ww7yowLlHSOlrirgG9EBFWE4oJ9RANiXTuTU8sJgshle8mBr 5yMg== X-Gm-Message-State: AOJu0YyElEnRqCfcBgOzaig47w79vUke2cSIEetQd5j2Y408xdetiYGP VX4eDa37TCdq6Mt7RXV2zTW+U8DIuJArNk3I1fxco+Kl1T/xmOexZ2m0c21Hj7Lvh5Yc4MUC9wc 3J6iCKcUn 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> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1031; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pj1-x1031.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 --- 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: 827836 Delivered-To: patch@linaro.org Received: by 2002:adf:ab1c:0:b0:367:895a:4699 with SMTP id q28csp1358817wrc; Thu, 12 Sep 2024 09:13:07 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWzs2nuahZ6Yjl5qJVHudok84ZFgH2+jLUMPc9GMzRONiE2r3OuvGh0vMzwHlxpyn9sKh5YBg==@linaro.org X-Google-Smtp-Source: AGHT+IGzTAyDq0OtIDO8LalwWXgIl/kCasEjqRhMrILPyl8aqpnuDZ2ZJl6IwAxpBEbemxB7u/oW X-Received: by 2002:a05:620a:2697:b0:7a9:c0f2:c4a9 with SMTP id af79cd13be357-7a9e5f054a4mr559821585a.23.1726157587249; Thu, 12 Sep 2024 09:13:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726157587; cv=none; d=google.com; s=arc-20240605; b=EtWRn460zejvIeYyhTQbQIQC/stXI04AeeG0HaEN0RGjCzhSPoIX8wiD+rGIA9YsXh LchkHrLAYT3EKyniQjCrffNIfFlCQtPQsO7kiU6iwPHIadAxhVbudBk4zkMp8lbdC1L0 mx55twsQTv5rvX98CTvOOQJxG9HjnKLdDpmpaos8Q5IT8AvCRMJg44FDS2ntjErufTSK EXJj0rGDrlRhiovBH9XDtNdnxf3ladLVV5uiEFQ7hf4EfCfOH0KlmTRvOxIcoHyVwdy4 ygyAJGI5MGcNfTQAq3I4Z8PjSNNikq/1dFH/CM6DFJfQpGOIHsvWMxugYt1+ytQ+fWYJ zUeA== 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=BppHFYoQrx4qC3DO9Sb1ugevP84fPlKPBSZdTDngGiU=; fh=ujiE8HSy6YTG7a3Z7CGLGec891YtQfFM1W/0TkY2zUo=; b=QHBEiwQoi84/dWHNovZhU+1fAy3j/fr8pcBIIpR7KPYeFnpeo+7MxA9IAas5VQdHPm VWdQ2H4vxeUBGY5LxXL5lVGnJ4fjcaMqYo/SohS9iUK2wqoxleYpomBOaXSwkLJQBrV/ f3SlAp20ghPOywW7c/hOteO5CFZNVGeCAkthm4JgF9MzJ4m4B9MgJH0aNG9j6N73d+XR BBhUcLDENkhiZjhGRRnuHuRMDT3RQ9uNTTSsSszTmSYV3rMP3w9/5Y3Z4mB9Ip/7p8d4 kK9H1mwxCtltpaMfGZ68b02OyuLGkxBqsXNAUJsnSI+JUMeFTmDkQoTfeKmnOyPiIJrD x2uQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NYxM+ZNe; 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 af79cd13be357-7a9a7a373b0si1342092485a.324.2024.09.12.09.13.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Sep 2024 09:13:07 -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=NYxM+ZNe; 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 1somQa-0000zs-VY; Thu, 12 Sep 2024 12:12:16 -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 1somQZ-0000ou-1s for qemu-devel@nongnu.org; Thu, 12 Sep 2024 12:12:15 -0400 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1somQV-0007TC-IF for qemu-devel@nongnu.org; Thu, 12 Sep 2024 12:12:14 -0400 Received: by mail-pj1-x102b.google.com with SMTP id 98e67ed59e1d1-2d88690837eso964923a91.2 for ; Thu, 12 Sep 2024 09:12:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1726157530; x=1726762330; 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=BppHFYoQrx4qC3DO9Sb1ugevP84fPlKPBSZdTDngGiU=; b=NYxM+ZNe1LWd1ZWDPQSCuNtUtcVipevVUwUpDd9l/HofKvRGu3pPziBJbVD1tcp+9k 1s4D7IHxiMLkMPXBja1NHxM0y63ftWx5XPjNBxkoUJAOzRxYgoRSpbXOLp/1GQtc97bN Sw9WL9PLmbg/mAln3+yWzD+JZTqM/NbTF2jWylTCR+mTtwWSvk6E/P4fVl2C4XPxY/TU kyHXatDgGpt5UcgYlT8uDXyYdX9KkEXNP3wjBOYpCNe3sjNta4K+ci1Z6hHtaCZ7AsMn k8uaIa2L6RKfl/Az8UisJCliF5T00rxpHrVAg+7kMkhMWhElKN5HhqKZ27+zLdO9sHWe d/Lg== 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=pwDCjbEEMZh5k53/9UFXsD/rlUoyZekubq5TZ/HUCSAFbv01Su85Xl+xtPT7Agr1ry Cnl21LYPR0E1aYQoWm9lHIIqt5ygnzb3qxAhsxceDpwviF/NVpJ9488BRWGTOBnKuDPw debrmXb5qLHedrUZyMLB8R5npwE/EgHKXW2+zGKBNuxphMUJJSxAv/kZfoeuoDR1m7Uq r0n/GZUU/CGwAVptkRtjNmQyDW74o+3AOImcjexCLpH/MbLgYn72zqXzvOQUUxlIKm+s Q+mR4em4A5UUMl70vjkcF614zQCoVdm/9VoSfi9u8ShxBSLX4rMr/8KHgzenhNCHblSk ZP3g== X-Gm-Message-State: AOJu0YzugMnRIZ9BW4RUy+SvnEb+jt61+HuiqSmlfAMbjcnMdrKHrGNE 8GUYzvACH1uOm7Aqw1i3Enazvl6mZf8akgQLiDwYoF6YEjovZ04mCiZ/LLSeWtxDuVPONa0APoC dTTjGFiW5 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> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pj1-x102b.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 --- 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: 827839 Delivered-To: patch@linaro.org Received: by 2002:adf:ab1c:0:b0:367:895a:4699 with SMTP id q28csp1359131wrc; Thu, 12 Sep 2024 09:13:47 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV0uoLWGt3WL52+/ui+up9OtgaWi9AiUVW5EC17zsynwMAxgw3zmY1lUzyfGmnDmt78s8H9eA==@linaro.org X-Google-Smtp-Source: AGHT+IFtaA+dcWGntEYT5b7V42mf64GEw1PbcTjqDFsl9zC0p3WcFE65u4JCCTyooYibsg+KLjec X-Received: by 2002:a05:622a:4e86:b0:458:3582:bcb with SMTP id d75a77b69052e-4586032601fmr49704551cf.30.1726157627453; Thu, 12 Sep 2024 09:13:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726157627; cv=none; d=google.com; s=arc-20240605; b=Lk9Ii8ELH9jzlzgCM1xc6Jo5NPD/eZyv6NvqSKqANe25VzwWbKsX0L+jUIBJGRM8Az qjY1xk7ls+wKjzEGyN1jRRaHDjN8OggCtfiYE2zblZos3NWaOaHfuNVqHSpDcDR4V528 7UPi9fk7K9uui88krPKlkA8KR16WWrahAGK4MwPJHnWGHLCc/XpYBMLDNz5AVJ17nJXr EIBD/3YLutbRZGyL1RY7Fr9XqZv5dWvePcutdHP+PCqCMokq+faa8+K9Iabt9Z9TQ7J0 1pT+3aQR8AEbR4VRGbGMnR9NJKUTrj3VMQMNhKuPNyBYW5aqzeNvU50lkEcYL6LHipP5 2qBA== 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=I2RDX2fjFJQRiytlapcKfuKzsswRML3AeBvlkH5UKQw=; fh=ujiE8HSy6YTG7a3Z7CGLGec891YtQfFM1W/0TkY2zUo=; b=SP3GBIMcnOuSrBjAaXH49itbgnq/Q3JHoGg8Z4KWUNH/Qs+3kCypnv2mb91M+gFfPq 4Vks8m4/xJvtpYU9D0cNSXxnZi2ZviQOUOFvXLHRd5IpRv9Hje40c8ibH7OwNmWFkqyY fU2mAQrNL/oYWnCDSFUO2+8XCWxN8pzrQhrFXoKuxsy2XyTokgtXhUROT/iO4XlZ7awp 89McrmK+CREqwCfACubaPMWVwd/DNIr7Kpj+zb0Ig4K+KCsbNx1umJfQYwsKs/9jKLhP rYREuhNpsRr9yW5gIavEg8isz02KMPiX8gRNzCGiW+jwZa+6HEaf7QU4pgP12RNcA5DE 8P5w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mPhQCxne; 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-4583033b465si100048361cf.290.2024.09.12.09.13.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Sep 2024 09:13:47 -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=mPhQCxne; 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 1somQe-0001Hn-9D; Thu, 12 Sep 2024 12:12:20 -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 1somQb-000142-E4 for qemu-devel@nongnu.org; Thu, 12 Sep 2024 12:12:17 -0400 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1somQX-0007U2-UA for qemu-devel@nongnu.org; Thu, 12 Sep 2024 12:12:17 -0400 Received: by mail-pg1-x52f.google.com with SMTP id 41be03b00d2f7-7db174f9050so442880a12.3 for ; Thu, 12 Sep 2024 09:12:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1726157532; x=1726762332; 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=I2RDX2fjFJQRiytlapcKfuKzsswRML3AeBvlkH5UKQw=; b=mPhQCxnesSFRAnRy9nSy67Qik154JleVck+GIOyjDXh45FsXtiiwcSGMXfYZ7sbA2Z Oq9fh71bC1yyU+zMU5WcmRdPikFDdle7E18SZmz0m5ulwMVmFikbQ6/vIvk87Ps5AK8K 6FMzjLyveZd/AuJBA8Y1/JY7gT9AijU0mI/Ocm25KH+PzxM1Q+4ousjQNERQSer05Qm0 15AmV5P5kK/Z0VZHORKCXkfLjVoVomiEoa0rV/QgYzzWDnigF+iF7EHtI95gt2HRO9K8 ugDbEHekzmc1BmqP3n2015hj5Qc91LfSL9/4eYxq6eC+Dh3G4M+v4bgMAPLSjcGOXcSK Nu5Q== 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=pQGhQMUm8hJkb47hBbSXPNYtUIHml9h6/7HEN1PLLZZYkSFdHa7W6ldAZqY/YSpoxu WBG79Sg2at1Xkmnh8pOm6IB8rP6aJERwXaonYMlV3lxbMLyDyT5A40O9ks+PoaCwSwFD pwhXb8xi5LeCcxa21gVbHOyQKVDtUgjKTB/E8hGadeHk7TQhh6fVupxSkMP7mBN3Y9ug e9HkB1Lj+8gAXNKhpoqVzn55j5QwFwv8D6nKiTWAjcsSnOTS1reLZdMUkAKxICpC3hu4 kqPMyoAcpxad55PkEkS6AfBNSToi1nqiqztcysaparQW1k1yhvk7x3rzQYtNYfmK23LT SG3w== X-Gm-Message-State: AOJu0Yzc8Sjj5ReaLvlSEOGMkLtpIoaYftY9i8Af1t8QrgqI1kkUXO1H G4P2bS2SU716mn7SkhH7ZIK/rPh8COYbEMGc0cb9jx5fjRy53iFkKQw4pnI14fL1eEc9Cohxk8F mGvUtt8XU 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> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52f; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pg1-x52f.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 --- 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: 827837 Delivered-To: patch@linaro.org Received: by 2002:adf:ab1c:0:b0:367:895a:4699 with SMTP id q28csp1358960wrc; Thu, 12 Sep 2024 09:13:25 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVeaWHvd7TLJQJoHwIw045aO58+2qZm0A8og7NpqBsU+Ksf1UY6XmcPamKe9GjqZMUzPcFvLQ==@linaro.org X-Google-Smtp-Source: AGHT+IH+wdKcXe0ydO2xxwWqa0/R1FJ8keRMlam0s7Xacvu9MV2GXpl3h5F2jjdj/O+xl+J/0R51 X-Received: by 2002:a05:620a:28d2:b0:7a5:27e:8814 with SMTP id af79cd13be357-7a9e5f5ef8amr476685785a.44.1726157605526; Thu, 12 Sep 2024 09:13:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726157605; cv=none; d=google.com; s=arc-20240605; b=Q+c7XLSvJVKBrF565Sgg8kYBzPMevtYDjed5Aw4ixRBY55B2/pqxjBdNpnK6ReGcHB Wcxq+eMSHQe1dYxfGAftU4sOdqB7sF1OncTJa7Na2WVtOTXr7uJc1VYDrsYF/35ldOuF YXmT6O11QJnxmBckHTNzTn/HWOXSVrMeRutPVbAmzk3c2Rm/qLpQjoKirTTQF3kN+RXE dagV6bK4zHCPg3PFh1TYIzlOOOIpOPrqgmTwifKnjHYK91oUmD8mEW02o1uRwldy84Te BAOfUt+h1pFnToo5SjvSONX9KRG2bOM2Y0MQRswPpzqgfu/3+YYQogQB71bnfa/MC5JZ 6f1g== 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=HWN+Oy9HOzHEP1zqC69VZ8fDvc5xR6kboU5Mz4xPMnU=; fh=ujiE8HSy6YTG7a3Z7CGLGec891YtQfFM1W/0TkY2zUo=; b=Ng22qx7suMoaCGU1slBk1M2AhAqwXuaVZK636Vj0YJY5pyTL/6zL2TM1Dgzzyb/CnV 3VHF3l5Cj/DhFpkrgSzOCBGYDOR17w8fubhI2oATudEnyglH8/UyEDOc7zuaxpdiEIUc cBcRH36RFO+dOJZdaWRLRvI9ykUd+NxlzVJi0Sp2c10RZ/TMfVi0L5S8bIlqX/lKGy/f qsL/cSt6zPN6zOEf4oVt/XdvTZ0KJcuLo32Da8wqf5ZYMztC88zuolfaNGr5LRiiWnlm zZ4yy5axlIRH777ZZRJ81vk/g2qheitowT9Ki2Nkht04gjRs2LWrTq0XZlOyvSPiP0uN W14w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qliJfrYW; 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 af79cd13be357-7a9a7a54d47si1338078885a.578.2024.09.12.09.13.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Sep 2024 09:13:25 -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=qliJfrYW; 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 1somQh-0001VC-15; Thu, 12 Sep 2024 12:12:23 -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 1somQc-00018n-5z for qemu-devel@nongnu.org; Thu, 12 Sep 2024 12:12:18 -0400 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1somQa-0007Vm-E1 for qemu-devel@nongnu.org; Thu, 12 Sep 2024 12:12:17 -0400 Received: by mail-pg1-x52f.google.com with SMTP id 41be03b00d2f7-7db19de6346so839486a12.2 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=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=HWN+Oy9HOzHEP1zqC69VZ8fDvc5xR6kboU5Mz4xPMnU=; b=qliJfrYWjg9UCQEjJ/2fj5MgAM67NRso0rLrm660LjwhmRDC2ygYSZLO0MdAOhZLkm tBE6SMfcNoOXrtbdVGHJA3NMRmL59t0dmB/IJ6+/0vxlYD+UBA/xVSRCArPRzLRNCRMx kCYUMvfJq6o70EMpqu+g5dmGkcJRdACfz+McdEB/U7YkREMM9hRpOuX1L2l8KczvBO7P KKBvrIEc2actiK7SFCxYDJq4nLEu/KO6oU30Lcutp2C1wBbOFt0tv+9NRmQ5IrCL5q0E CdcMex/H3y0XJ3hY9OXonjj4N0KdG9pz32SLwT7CWnKdPYbWuz9yaf4DKAVpmHvSFPH+ G91g== 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=nj4q+Xv6zDjzdJLh5+JAIBmkf6FAzgsI0F/Bwpw4xn2eCkqbR31welaR4jQIpgDiYV hFNCtCrvGwqsPEOXzEhoWmzDpsIn00dFv2FFkPyQDznLq8BLdfHSjOghSP+woAsdJVF3 sSGdLSihH8GuanVm+rEFbMpcOft+jyi/1410okdHEFdLHeiYQ355xP8NSTFUtY/GtTDC 8ErUjzS632q3jEIgUnCoTc81pHtobKrbGs8HiRW4TznQUOajgwnZ6Woj2J3SuZPuM+3J Z11TtZPuGNOjP+xiu6s4Hc0HY7gbpXqTPBw2UuQp9+QTxSs6kcjHZrmk2wMQRT+OtAEV j+cA== X-Gm-Message-State: AOJu0YypN1wOIcKzU8ASw7zzCbc5h25M/TcTfSpM9Bt6f6mvep5JKA5q zdjvlsPqTyXplrJ2IMtofD436QFSSNIFRrjWgSLuSFuXGekiCY4GKlbsqWJBANL4z3NyiubCNXN P+bqvXP4T 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> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52f; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pg1-x52f.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=ham 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. 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); }