From nobody Sat Nov 23 19:45:15 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1729708226; cv=none; d=zohomail.com; s=zohoarc; b=Cr3GBKOqeASbJVRXBLmLWmFp46zdqOV2jnUgaA+Gb3av8k6TCH/jSwK9L0TLy+jLBhSfIIQXst3aqJ8RaQc08X7LutZSjK5Dobrm+0+rdNbCmgqP7XPEIe+oJOwonLJVVwGIHEpOD5IcUGjjzT0f1HLAQe2mLNDft7NgGrsOyqM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1729708226; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=EyPHkszPEEqFmMxvX7LJ+5qG1a8+TksRJHfyo/cOntU=; b=B8Fr0FBpvd5axp/c8Vxgp82AZz8qE96ZEe6mhKF20xRakT7pNYoXkQmyhI2eE/3X46nSgPDRJ7LbbP3EUqPjt7kgGDFk/xnpydn97JdbbFuN0DDQzDxNfS0YqnuU0/UnqxCA4NvyuwtccahyIGeB2IGyCrXFOhqY306tAaMNwCE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1729708226679400.48236646219107; Wed, 23 Oct 2024 11:30:26 -0700 (PDT) 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) 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) 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-Google-Smtp-Source: AGHT+IHX+lBIinduWGoZve4ocFEEhtMfqBGF6fZ1hEx2M8LUSx5QoCU5GVspihQTHNclLCO2exwo0w== 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) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Daniel=20P=20=2E=20Berrang=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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1729708228677116600 Content-Type: text/plain; charset="utf-8" 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); =20 struct x86_segment_descriptor curr_tss_desc, next_tss_desc; - int ret; x68_segment_selector old_tss_sel =3D vmx_read_segment_selector(cpu, R_= TR); uint64_t old_tss_base =3D 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 =3D=3D TSR_IDT_GATE && gate_valid) { int dpl; =20 - ret =3D x86_read_call_gate(cpu, &task_gate_desc, gate); + x86_read_call_gate(cpu, &task_gate_desc, gate); =20 dpl =3D task_gate_desc.dpl; x68_segment_selector cs =3D vmx_read_segment_selector(cpu, R_CS); @@ -167,11 +166,12 @@ void vmx_handle_task_switch(CPUState *cpu, x68_segmen= t_selector tss_sel, int rea x86_write_segment_descriptor(cpu, &next_tss_desc, tss_sel); } =20 - if (next_tss_desc.type & 8) - ret =3D task_switch_32(cpu, tss_sel, old_tss_sel, old_tss_base, &n= ext_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 =3D task_switch_16(cpu, tss_sel, old_tss_sel, old_tss_base, = &next_tss_desc); VM_PANIC("task_switch_16"); + } =20 macvm_set_cr0(cpu->accel->fd, rvmcs(cpu->accel->fd, VMCS_GUEST_CR0) | CR0_TS_MASK); --=20 2.39.5