Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp4249503pxb; Tue, 25 Jan 2022 06:40:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJy/vZiuvO0zkPcK1gacvq0uHUTB2RBER8J1bBCoU1Ii9uyEcGjGe23TPH83OSmvaRXy/LTh X-Received: by 2002:aa7:d505:: with SMTP id y5mr20767130edq.238.1643121635722; Tue, 25 Jan 2022 06:40:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643121635; cv=none; d=google.com; s=arc-20160816; b=YI+DAn+u3NgaZSPWWj/mW3HElIITjhXVXcKvsJXAyOQMkBwuA7CqnOfB1UajT9X0BE LF6lsgIylDUsEuM531B9RluncHk8jeOnRY+kvJYM20GQtGrQH0k3k+uIxn/flssH5s+v Yg0Nb+bqZufiywtq7JgGwGPmCbvLS79b3TZRErHn2WkXe9ALCeoq9HSuXckBSKzI6mAe MpM9vXKqqYF4FLAFCvTxRdOTVId/yQ6Le6s7/L5AJ5qSnOf9nDqA+p55UUVmo3ljRz0V c6c975QYVab4zm3g8P5Miovca5Pv4ZoRxULahWRcPu/qn1+s13xrXjdUf56EItyhj1+d BSZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=CubPfo8X6E6cLCRQ+9YQFpgd03CzrlDLAlSclXyiqwM=; b=PCC1DTRwRE8fi4Xhe9xSRDOtZ+yo2A3WdBHdwv/hI98Fkbobm89uNFesej/PvLyKFN LOkWvtlTWt65dIqOguAFlEOZpS8EaPlrO1fXp+b9ah2on3EDTLX8+PfeWGQ2KYt/imMW JVzspqiL2f9SX5evKB6R5X0MVNcqcm3fv/XvwSQkGTMgT9IKvFfZYE4rBG3ZSNw4WhhI 17VpD6U6fh0F/XKqGI6O3L7QzarMA1pbYoKHc7ZykpBe6ZaApDPPVW0uQCzdsCgZoxVd FBqdS4Xe81ilpBcwah9nbvHzodCjdmsm3QBfsCFH+RXJ8SrU3lYGQOUOJpY5Z7CT2T3t 11Qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=TYu2hzxh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gb41si3205272ejc.425.2022.01.25.06.40.09; Tue, 25 Jan 2022 06:40:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=TYu2hzxh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241399AbiAYKGu (ORCPT + 99 others); Tue, 25 Jan 2022 05:06:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238553AbiAYJ7y (ORCPT ); Tue, 25 Jan 2022 04:59:54 -0500 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40C12C061759; Tue, 25 Jan 2022 01:59:54 -0800 (PST) Received: by mail-pg1-x543.google.com with SMTP id h23so17807615pgk.11; Tue, 25 Jan 2022 01:59:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CubPfo8X6E6cLCRQ+9YQFpgd03CzrlDLAlSclXyiqwM=; b=TYu2hzxhyUdjSdW4KzB0PgKW9Qz71gcHjEYoVWvjdSBfpPlHxw+0PXC3VLvLMHIFK2 a/j+0xzi533KhtP5gZ2w+vyWVf6354B3agubc74M5PlKNK4Tobp0/tSCK303cMHbLMfn shESi3Aq3g/9NY8RhCzvqHCcQTB7DK6JdosachSbNEr/s/XSoYUSuwOW4h7tO9sFwijT nvO8sYjQa1brA8xJLIc8dHlMo/mTdGLOASpxM0LUA0r4ctZPplYRzQXhUC+gkClZrlRD XgRtg2S94K6Oww8Ks5nj434KY4EsDg7N+BpWEutSU/Q8ICBZePIVh97sPlevCORJhh5J Z0uQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CubPfo8X6E6cLCRQ+9YQFpgd03CzrlDLAlSclXyiqwM=; b=BVfCIhqgRncsrU11mybbMqQdHKF5Gk1GZPCZziRT1bJbShnddOZE67V6LOKbMelCbV SZsyaTi/TT/wnJa/l6mjW27QUFWPHzRb386pg69JbFsURbrDGPgTbbJrVl0l9JMRQ4vD klOkDBB0qautA5CTRTDqiMr1OXjL/UHK57vEpVaqqd0whwH1etAz9xMb5+DKxq9mQozH odl5bGYTMvYyEdcjVQrhbbJN2YIQrooNh1qqQ4w3DdHyBM+y6zK7j30cAXb8FfOJxuzU tjsQUlE+5OlT/kFyEfryhvHz1sX4zjj5ABpNZKJDcKNcLuLCmO/JRGaP0goFzXph7b1F h3nQ== X-Gm-Message-State: AOAM531c9/hzQFl1+08UYqEv/SA2QwtNGgn1ZZ7QQ2JMmDkN5Nvy2Bw4 QO21d1ZNPsfAzKZL8FuCjUs= X-Received: by 2002:a05:6a00:15ce:b0:4ca:5090:dbe6 with SMTP id o14-20020a056a0015ce00b004ca5090dbe6mr4828275pfu.84.1643104793842; Tue, 25 Jan 2022 01:59:53 -0800 (PST) Received: from CLOUDLIANG-MB0.tencent.com ([103.7.29.32]) by smtp.gmail.com with ESMTPSA id mq3sm201606pjb.4.2022.01.25.01.59.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Jan 2022 01:59:53 -0800 (PST) From: Jinrong Liang X-Google-Original-From: Jinrong Liang To: Paolo Bonzini Cc: Xianting Tian , Jim Mattson , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 15/19] KVM: x86/emulate: Remove unused "ctxt" of task_switch_{16, 32}() Date: Tue, 25 Jan 2022 17:59:05 +0800 Message-Id: <20220125095909.38122-16-cloudliang@tencent.com> X-Mailer: git-send-email 2.30.1 (Apple Git-130) In-Reply-To: <20220125095909.38122-1-cloudliang@tencent.com> References: <20220125095909.38122-1-cloudliang@tencent.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jinrong Liang The "struct x86_emulate_ctxt *ctxt" parameter of task_switch_{16, 32}() is not used, so remove it. No functional change intended. Signed-off-by: Jinrong Liang --- arch/x86/kvm/emulate.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index c2d9fe6449c2..9e4a00d04532 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -3020,8 +3020,7 @@ static int load_state_from_tss16(struct x86_emulate_ctxt *ctxt, return X86EMUL_CONTINUE; } -static int task_switch_16(struct x86_emulate_ctxt *ctxt, - u16 tss_selector, u16 old_tss_sel, +static int task_switch_16(struct x86_emulate_ctxt *ctxt, u16 old_tss_sel, ulong old_tss_base, struct desc_struct *new_desc) { struct tss_segment_16 tss_seg; @@ -3159,8 +3158,7 @@ static int load_state_from_tss32(struct x86_emulate_ctxt *ctxt, return ret; } -static int task_switch_32(struct x86_emulate_ctxt *ctxt, - u16 tss_selector, u16 old_tss_sel, +static int task_switch_32(struct x86_emulate_ctxt *ctxt, u16 old_tss_sel, ulong old_tss_base, struct desc_struct *new_desc) { struct tss_segment_32 tss_seg; @@ -3268,10 +3266,9 @@ static int emulator_do_task_switch(struct x86_emulate_ctxt *ctxt, old_tss_sel = 0xffff; if (next_tss_desc.type & 8) - ret = task_switch_32(ctxt, tss_selector, old_tss_sel, - old_tss_base, &next_tss_desc); + ret = task_switch_32(ctxt, old_tss_sel, old_tss_base, &next_tss_desc); else - ret = task_switch_16(ctxt, tss_selector, old_tss_sel, + ret = task_switch_16(ctxt, old_tss_sel, old_tss_base, &next_tss_desc); if (ret != X86EMUL_CONTINUE) return ret; -- 2.33.1