From patchwork Wed Oct 23 18:29:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 837822 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:1f12:b0:37d:45d0:187 with SMTP id hh18csp624612wrb; Wed, 23 Oct 2024 11:30:26 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWucvMJ6jAOgfy4OIO2UN3j8jhpsKXxiLPdeA5spdl5lS4J3tzBOZByeR9kiGRY3zEdZx1tuA==@linaro.org X-Google-Smtp-Source: AGHT+IHL6bLoGv06Hrh4NIXqvL9IeIdcNLK7YlapyJ8OaQYoNJ/ugSSZ3+6Ouk0VviDtUkLBa4if X-Received: by 2002:a05:620a:424d:b0:7b1:43a5:2746 with SMTP id af79cd13be357-7b17e55bf11mr420699085a.20.1729708226352; Wed, 23 Oct 2024 11:30:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729708226; cv=none; d=google.com; s=arc-20240605; b=CDCp1RK6KqnleU8xiN6PXhTpeYJQMSRdtUZ+ehlkvqQrlKsuiLZR1YFJcBuNRtDUka f9NCGsrEcniREvlyt059lJid6rJyTfrts4Gjb5pzgIffuII4UWiZeDxx5RcHroBGcInZ utBYYAYZLZ+2tK5QmnCFsPpDl+f1WUdhJkiW3Aggt/C4tc7+ZgrXt+zZ6P+IfJiySUgF qSmO/TEzBZWeCBYCBLXysK9dInDq6DAjjQ30ipwDusUQOgjzaZ+IIPbeg32kOgbpeFag hRVx7pRMOrdxJQGE3qT/N29SVHkS020r/h7Q4TWHFCtyzaXhj3Oi5WfO54dw7I049zjh 9STw== 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=EyPHkszPEEqFmMxvX7LJ+5qG1a8+TksRJHfyo/cOntU=; fh=kWXvUNfoCd48LqIeNn3CqxgtYjXgL+EAJt9P6OAa8fc=; b=EvcD5iKQxh7Ln61O9Q1N69ZkN86lzQ4aQt+Ph84XeooceBpx2BImlMKNMK15etR8sx DAonyyuiL9iq9klCtTtIKFQ0Mo8oasQ30onshEgoyhm3+EFieGkQr4Gu2Mq/nMppKcs0 NEI6UDo9qZTLuF4lBuxehneXLzDjqTX6X5a2nsKFuprWIF2LhRo9Ext8jF46fXpU1pBL e3WwZdABhCipu4mrxoWC7lVxlJQMyhtgxyT2stPlVYi9o5FIZQ+qRhCtNjS88sv2rHBZ FqQPdhe3AzJOfNpDPhKXzDbeJv2C22d/CQOT3pdMVSKeEOxr0uI6kBq5Bu9GLpw2Paa1 co6Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rO7K6x7+; 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-7b1659cfc4dsi927785685a.49.2024.10.23.11.30.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Oct 2024 11:30:26 -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=rO7K6x7+; 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 1t3g71-0001Zx-GB; Wed, 23 Oct 2024 14:29:39 -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 1t3g6y-0001Zk-Mn for qemu-devel@nongnu.org; Wed, 23 Oct 2024 14:29:36 -0400 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t3g6x-00085i-1E for qemu-devel@nongnu.org; Wed, 23 Oct 2024 14:29:36 -0400 Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-71e93d551a3so97152b3a.1 for ; Wed, 23 Oct 2024 11:29:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729708173; x=1730312973; 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=EyPHkszPEEqFmMxvX7LJ+5qG1a8+TksRJHfyo/cOntU=; b=rO7K6x7+9q9Sn//PE0yY31ch2EhM3g+V8S3Y2hyjsOPL/bE3lYkF67zLH02s13iVab GOUeQqCaZWSIYIcw5iYoeWDSmwlPw5yeyDZWEj4pxxQsLA99uk5ILiINIQZ7AcLd2GEX /9LgGAzpI341Zgw/tKyCuQxxYAc9Sj0BkiMeXot+3GQwa0PTWNSazyInfEZV8ltnxkck ph6/ILZeRI/jVToJF24Kag2uBJKt6S/NuIrUbrrI2OwgHy3b9ZpAnB5lEjU7htaVYONF Me9dyP1HSyh5hGNYnF3xk+hXNGJDHj38lLFK1qS2OKgIm1bnmL8kn8aBBMV4qZQxdGIu ET8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729708173; x=1730312973; 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=EyPHkszPEEqFmMxvX7LJ+5qG1a8+TksRJHfyo/cOntU=; b=wN6DLF9GaSA6aSn4CzsXP9/i9pqIfy+mr7vQtRcfDAcw+0YcLYHZXxd9CwzqE115oF Ix6//gffYtXuE9qVG6jIeiYzgJ+LfibyPoqYEbUVtfpTen1Ww/dXDBZ+5xph93Utin9z dBncuhTEM8HAvEL0M47h8y/brHLSYcNwNLJLFND3Jit1bAoZQUS28AOq0WATA3Lk3ujt wxKxROy9to7Xa9v8MpUxTVlonLtpgsAdvVcYE/uijy1dKYyZIaQHdmU8CTKDhH441o8I SvGQ5Y9Fw9lN459cdsXZvzzGLriYctF57DehoHa5b4IYwA0VrHZD+Z55LGoilHQ4gtti IzPw== X-Gm-Message-State: AOJu0YxUXPhLpL5LxQLSWq/puP0gK9st/pZIGWs79EkH5Mh7QWRafnXm cvCqpTQnGV3en9fb3ei+8U8ZqgtmrTesAnwS6SWCyEygRKFMPRZrKCUCmFAWt9WoPY8YYmqF1lV pGFax6Q== X-Received: by 2002:a05:6a00:9297:b0:71e:98a:b6b4 with SMTP id d2e1a72fcca58-72030babd9fmr3658223b3a.11.1729708173350; Wed, 23 Oct 2024 11:29:33 -0700 (PDT) Received: from linaro.. (216-180-64-156.dyn.novuscom.net. [216.180.64.156]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71ec14088fesm6596177b3a.200.2024.10.23.11.29.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2024 11:29:32 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , alex.bennee@linaro.org, Roman Bolshakov , Cameron Esfahani , Pierrick Bouvier Subject: [PATCH] hvf: remove unused but set variable Date: Wed, 23 Oct 2024 11:29:22 -0700 Message-Id: <20241023182922.1040964-1-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x432.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 fixes associated warning when building on MacOS. Signed-off-by: Pierrick Bouvier Reviewed-by: Richard Henderson --- target/i386/hvf/x86_task.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/target/i386/hvf/x86_task.c b/target/i386/hvf/x86_task.c index f09bfbdda5b..cdea2ea69d9 100644 --- a/target/i386/hvf/x86_task.c +++ b/target/i386/hvf/x86_task.c @@ -122,7 +122,6 @@ void vmx_handle_task_switch(CPUState *cpu, x68_segment_selector tss_sel, int rea load_regs(cpu); struct x86_segment_descriptor curr_tss_desc, next_tss_desc; - int ret; x68_segment_selector old_tss_sel = vmx_read_segment_selector(cpu, R_TR); uint64_t old_tss_base = vmx_read_segment_base(cpu, R_TR); uint32_t desc_limit; @@ -138,7 +137,7 @@ void vmx_handle_task_switch(CPUState *cpu, x68_segment_selector tss_sel, int rea if (reason == TSR_IDT_GATE && gate_valid) { int dpl; - ret = x86_read_call_gate(cpu, &task_gate_desc, gate); + x86_read_call_gate(cpu, &task_gate_desc, gate); dpl = task_gate_desc.dpl; x68_segment_selector cs = vmx_read_segment_selector(cpu, R_CS); @@ -167,11 +166,12 @@ void vmx_handle_task_switch(CPUState *cpu, x68_segment_selector tss_sel, int rea x86_write_segment_descriptor(cpu, &next_tss_desc, tss_sel); } - if (next_tss_desc.type & 8) - ret = task_switch_32(cpu, tss_sel, old_tss_sel, old_tss_base, &next_tss_desc); - else + if (next_tss_desc.type & 8) { + task_switch_32(cpu, tss_sel, old_tss_sel, old_tss_base, &next_tss_desc); + } else { //ret = task_switch_16(cpu, tss_sel, old_tss_sel, old_tss_base, &next_tss_desc); VM_PANIC("task_switch_16"); + } macvm_set_cr0(cpu->accel->fd, rvmcs(cpu->accel->fd, VMCS_GUEST_CR0) | CR0_TS_MASK);