From patchwork Fri Dec 20 16:55:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ariel Otilibili-Anieli X-Patchwork-Id: 13917136 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D3863E7718B for ; Fri, 20 Dec 2024 16:59:17 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.861886.1273922 (Exim 4.92) (envelope-from ) id 1tOgLD-0008Qk-Ob; Fri, 20 Dec 2024 16:59:07 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 861886.1273922; Fri, 20 Dec 2024 16:59:07 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tOgLD-0008Qd-Lt; Fri, 20 Dec 2024 16:59:07 +0000 Received: by outflank-mailman (input) for mailman id 861886; Fri, 20 Dec 2024 16:59:06 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tOgLC-0008Bw-Da for xen-devel@lists.xenproject.org; Fri, 20 Dec 2024 16:59:06 +0000 Received: from smtp.eurecom.fr (smtp.eurecom.fr [193.55.113.210]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id b814d637-bef3-11ef-99a3-01e77a169b0f; Fri, 20 Dec 2024 17:59:04 +0100 (CET) Received: from waha.eurecom.fr (HELO smtps.eurecom.fr) ([10.3.2.236]) by drago1i.eurecom.fr with ESMTP; 20 Dec 2024 17:59:04 +0100 Received: from localhost.localdomain (88-183-119-157.subs.proxad.net [88.183.119.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtps.eurecom.fr (Postfix) with ESMTPSA id 4EA3C249C; Fri, 20 Dec 2024 17:59:04 +0100 (CET) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: b814d637-bef3-11ef-99a3-01e77a169b0f DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=eurecom.fr; i=@eurecom.fr; q=dns/txt; s=default; t=1734713944; x=1766249944; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4i2tjOWPEe+/kqhdo4JieYd+715XS4qCn1BWn9RgnsE=; b=aKILMVjJcSP+tXzoGnssk9IJKKwuOT4YnuWKa05rr3CSX0aqzvJySQry uaMPAIrxca1W3cA2icpObEoDksBCAGE9ue5CgOU+pHsHZ8+AuR0bmNh3O 3YaDvbUTC1xZxH6+5kQeLeu3Qz8ghpueSzloSeZg4A1fD6WLBYHoV2zqp U=; X-CSE-ConnectionGUID: YaCuNDfVTTqxD/b62A41jQ== X-CSE-MsgGUID: a8VQNH35ThW9kSqhvOiLnA== X-IronPort-AV: E=Sophos;i="6.12,251,1728943200"; d="scan'208";a="28280239" From: Ariel Otilibili To: xen-devel@lists.xenproject.org Cc: Ariel Otilibili , Anthony PERARD , Juergen Gross , "Daniel P. Smith" Subject: [PATCH 1/2] tools/libs: remove dead code Date: Fri, 20 Dec 2024 17:55:01 +0100 Message-ID: <20241220165837.937976-2-Ariel.Otilibili-Anieli@eurecom.fr> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241220165837.937976-1-Ariel.Otilibili-Anieli@eurecom.fr> References: <20241220165837.937976-1-Ariel.Otilibili-Anieli@eurecom.fr> MIME-Version: 1.0 Default switch cases skip these steps; these instructions are never reached. Coverity-IDs: 1056148, 1056149 Fixes: 0a69ea908d ("libxl: ao: convert libxl__spawn_*") Fixes: 643b106b40 ("libxl: do not use tap disk backend other than for raw and vhd") Signed-off-by: Ariel Otilibili --- Cc: Anthony PERARD Cc: Juergen Gross Cc: "Daniel P. Smith" --- tools/libs/light/libxl_create.c | 1 - tools/libs/light/libxl_device.c | 1 - 2 files changed, 2 deletions(-) diff --git a/tools/libs/light/libxl_create.c b/tools/libs/light/libxl_create.c index e03599ea99..d0271bef7e 100644 --- a/tools/libs/light/libxl_create.c +++ b/tools/libs/light/libxl_create.c @@ -1890,7 +1890,6 @@ static void domcreate_launch_dm(libxl__egc *egc, libxl__multidev *multidev, ret = ERROR_INVAL; goto error_out; } - abort(); /* not reached */ error_out: assert(ret); diff --git a/tools/libs/light/libxl_device.c b/tools/libs/light/libxl_device.c index 4faa5fa3bd..96046803e1 100644 --- a/tools/libs/light/libxl_device.c +++ b/tools/libs/light/libxl_device.c @@ -392,7 +392,6 @@ static int disk_try_backend(disk_try_backend_args *a, return 0; } - abort(); /* notreached */ bad_format: LOG(DEBUG, "Disk vdev=%s, backend %s unsuitable due to format %s", From patchwork Fri Dec 20 16:55:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ariel Otilibili-Anieli X-Patchwork-Id: 13917138 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0853AE77188 for ; Fri, 20 Dec 2024 16:59:27 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.861887.1273933 (Exim 4.92) (envelope-from ) id 1tOgLQ-0000N6-0d; Fri, 20 Dec 2024 16:59:20 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 861887.1273933; Fri, 20 Dec 2024 16:59:19 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tOgLP-0000Mw-Sn; Fri, 20 Dec 2024 16:59:19 +0000 Received: by outflank-mailman (input) for mailman id 861887; Fri, 20 Dec 2024 16:59:19 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tOgLP-0008Bw-AQ for xen-devel@lists.xenproject.org; Fri, 20 Dec 2024 16:59:19 +0000 Received: from smtp.eurecom.fr (smtp.eurecom.fr [193.55.113.210]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id bfb58e36-bef3-11ef-99a3-01e77a169b0f; Fri, 20 Dec 2024 17:59:17 +0100 (CET) Received: from waha.eurecom.fr (HELO smtps.eurecom.fr) ([10.3.2.236]) by drago1i.eurecom.fr with ESMTP; 20 Dec 2024 17:59:17 +0100 Received: from localhost.localdomain (88-183-119-157.subs.proxad.net [88.183.119.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtps.eurecom.fr (Postfix) with ESMTPSA id 2BD21249D; Fri, 20 Dec 2024 17:59:17 +0100 (CET) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: bfb58e36-bef3-11ef-99a3-01e77a169b0f DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=eurecom.fr; i=@eurecom.fr; q=dns/txt; s=default; t=1734713957; x=1766249957; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=zjQnlMsaSGWfGsQEe6M09GEFyw9td1gDFl+U5txZ89s=; b=QNQl3IpmWOzv3WWYmpsaaSdWT+2j/hiYC/YrZt4bDwYQU26+zNXAoQ1T /u1baMrzmM+giPrR4waWhw75hM9tjmWhHEEnm9BpCDzNZ5cCuSzfQT/Zf btRZZOpFQUq0Rcq9C/Li4z2FBeKkeYte6Gz4eXGxk1T+lWu/S5ZGhpsNJ I=; X-CSE-ConnectionGUID: QKe6ummCS/WzZkNaNCWGTQ== X-CSE-MsgGUID: +PZQN/0yRXq89cbRwlaFoQ== X-IronPort-AV: E=Sophos;i="6.12,251,1728943200"; d="scan'208";a="28280241" From: Ariel Otilibili To: xen-devel@lists.xenproject.org Cc: Ariel Otilibili , Doug Goldstein Subject: [PATCH 2/2] xen/tools: remove dead code Date: Fri, 20 Dec 2024 17:55:02 +0100 Message-ID: <20241220165837.937976-3-Ariel.Otilibili-Anieli@eurecom.fr> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241220165837.937976-1-Ariel.Otilibili-Anieli@eurecom.fr> References: <20241220165837.937976-1-Ariel.Otilibili-Anieli@eurecom.fr> MIME-Version: 1.0 Default switch case exits directly; these instructions are never reached. The file was taken from Linux; the copies have diverged a lot since: ``` $ diff -u xen/xen/tools/kconfig/expr.c linux/scripts/kconfig/expr.c | wc -l 984 ``` Therefore the change is only applied locally. Coverity-ID: 1458052 Fixes: 8c271b7584 ("build: import Kbuild/Kconfig from Linux 4.3") Signed-off-by: Ariel Otilibili --- Cc: Doug Goldstein --- xen/tools/kconfig/expr.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/xen/tools/kconfig/expr.c b/xen/tools/kconfig/expr.c index 77ffff3a05..be1400cdaf 100644 --- a/xen/tools/kconfig/expr.c +++ b/xen/tools/kconfig/expr.c @@ -1125,8 +1125,6 @@ static int expr_compare_type(enum expr_type t1, enum expr_type t2) default: return -1; } - printf("[%dgt%d?]", t1, t2); - return 0; } void expr_print(struct expr *e,